Skip to content

Instantly share code, notes, and snippets.

@pbrewczynski
Created May 14, 2013 10:16
Show Gist options
  • Save pbrewczynski/5574988 to your computer and use it in GitHub Desktop.
Save pbrewczynski/5574988 to your computer and use it in GitHub Desktop.
Node js
var http = require("http");
var s = http.createServer(function(req, res) {
res.writeHead(200, {'content-type' : 'text/plain'});
res.write("hello \n");
setTimeout(function () {
res.end("world \n");
},2000);
});
s.listen(8000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment