Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Side by Side Diff: samples/total/src/TotalServer.dart

Issue 8292003: Total now reads mortgage sample from server (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix Process stdout and stderr renames Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/total/src/TotalRunner.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library("total:server"); 5 #library("total:server");
6 6
7 #import("../../chat/chat_server_lib.dart"); 7 #import("../../chat/chat_server_lib.dart");
8 #import("../../chat/http.dart"); 8 #import("../../chat/http.dart");
9 #import("Dartc.dart"); 9 #import("Dartc.dart");
10 #source("GetSpreadsheet.dart");
11 #source("SYLKProducer.dart");
10 12
11 void main() { 13 void main() {
12 final String host = '0.0.0.0'; 14 final String host = '0.0.0.0';
13 final int port = 9090; 15 final int port = 9090;
14 16
15 new ServerMain.start(new TotalServer(), host, port); 17 new ServerMain.start(new TotalServer(), host, port);
16 } 18 }
17 19
18 class TotalServer extends IsolatedServer { 20 class TotalServer extends IsolatedServer {
19 final String CLIENT_DIR = '../../../client/samples/total/src'; 21 final String CLIENT_DIR = '../../../client/samples/total/src';
(...skipping 19 matching lines...) Expand all
39 'fake-profile-photo.png', 41 'fake-profile-photo.png',
40 'fake-sandbar-controls.png', 42 'fake-sandbar-controls.png',
41 'favicon.png', 43 'favicon.png',
42 'graphobject.png', 44 'graphobject.png',
43 'inner-menu-bg.png', 45 'inner-menu-bg.png',
44 'objectbarbg.png', 46 'objectbarbg.png',
45 'tableobject.png',]) { 47 'tableobject.png',]) {
46 addHandler("/img/$fileName", (HTTPRequest request, HTTPResponse response) 48 addHandler("/img/$fileName", (HTTPRequest request, HTTPResponse response)
47 => fileHandler(request, response, "${CLIENT_DIR}/img/$fileName" )); 49 => fileHandler(request, response, "${CLIENT_DIR}/img/$fileName" ));
48 } 50 }
51 addHandler('/spreadsheet/get', GetSpreadsheet.getSample);
52 addHandler('/spreadsheet/list', GetSpreadsheet.listSamples);
53
49 addHandler("/adm/Adminz.js", 54 addHandler("/adm/Adminz.js",
50 (HTTPRequest request, HTTPResponse response) 55 (HTTPRequest request, HTTPResponse response)
51 => fileHandler(request, response, "${CLIENT_DIR}/Adminz.js")); 56 => fileHandler(request, response, "${CLIENT_DIR}/Adminz.js"));
52 addHandler("/adm/stop", stopServer); 57 addHandler("/adm/stop", stopServer);
53 addHandler("/adm/restart", restartServer); 58 addHandler("/adm/restart", restartServer);
54 } 59 }
55 60
56 void restartServer(HTTPRequest request, HTTPResponse response) { 61 void restartServer(HTTPRequest request, HTTPResponse response) {
57 writeData(request, response, 'Restarting, KBBS', 'text/plain'); 62 writeData(request, response, 'Restarting, KBBS', 'text/plain');
58 stop(); 63 stop();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 errorDiv.appendChild(errorSpan); 109 errorDiv.appendChild(errorSpan);
105 110
106 document.body.appendChild(errorDiv); 111 document.body.appendChild(errorDiv);
107 '''; 112 ''';
108 writeData(request, response, errorScript, "application/javascript"); 113 writeData(request, response, errorScript, "application/javascript");
109 } 114 }
110 }); 115 });
111 } 116 }
112 } 117 }
113 118
OLDNEW
« no previous file with comments | « samples/total/src/TotalRunner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698