Skip to content

Instantly share code, notes, and snippets.

@mranney
Created March 31, 2010 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mranney/350972 to your computer and use it in GitHub Desktop.
Save mranney/350972 to your computer and use it in GitHub Desktop.
var sys = require('sys'),
http = require('http');
http.createServer(function (req, res) {
setTimeout(function () {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('Hello World');
res.close();
}, 2000);
}).listen(8000);
process.addListener('SIGHUP', function () {
sys.puts("Ignoring SIGHUP");
});
sys.puts('Server running at http://127.0.0.1:8000/');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment