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

Side by Side Diff: client/fling/samples/lil_server.dart

Issue 9314025: Remove fling, deftserver (used only by fling), and commons-codec (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 months 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 | « client/fling/fling.gypi ('k') | client/fling/samples/static/index.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 #library('lil_server');
6
7 #import('../fling.dart');
8
9 void main() {
10 // Create a new server.
11 HttpServer server = new HttpServer();
12 server.handle("/good", (HttpRequest req, HttpResponse res) {
13 res.setHeader("Content-Type", "text/plain");
14 res.write("path: ".concat(req.requestedPath).concat(", prefix: ").concat(req .prefix));
15 res.finish();
16 });
17 server.handle("/bad", (HttpRequest req, HttpResponse res) {
18 res.setStatusCode(500);
19 res.finish();
20 });
21 server.handle("/app/", ClientApp.create("static"));
22 server.listen(9090);
23
24 print("Started server at http://localhost:9090/");
25
26 // Runs the message loop.
27 Fling.goForth();
28 }
OLDNEW
« no previous file with comments | « client/fling/fling.gypi ('k') | client/fling/samples/static/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698