Skip to content

Instantly share code, notes, and snippets.

@benw
Created January 11, 2010 02:59
Show Gist options
  • Save benw/273959 to your computer and use it in GitHub Desktop.
Save benw/273959 to your computer and use it in GitHub Desktop.
var sys = require('sys'),
http = require('http');
http.createServer(function (req, res) {
setTimeout(function () {
res.sendHeader(200, {'Content-Type': 'text/plain'});
res.sendBody('Hello World');
res.finish();
}, 2000);
}).listen(3000);
sys.puts('Server running at http://127.0.0.1:3000/');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment