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

Side by Side Diff: frog/samples/node/httpServer.dart

Issue 9034014: Add support for the node net module. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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
OLDNEW
(Empty)
1 #library('httpServer');
2
3 #import('../../lib/node/node.dart');
4 #import('../../lib/node/http.dart');
5
6 void main() {
7 // Note: the callback function must use the actual types for the arguments,
8 // otherwise frog will strip out the type's methods.
9 http.createServer((ServerRequest req, ServerResponse res) {
10 res.writeHead(200, '', {'Content-Type': 'text/plain'});
11 res.end('Hello World\n');
12 }).listen(1337, "127.0.0.1");
13 console.log('Server running at http://127.0.0.1:1337/');
14 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698