Skip to content

Instantly share code, notes, and snippets.

@hassox
Created December 21, 2009 08:33
Show Gist options
  • Save hassox/260853 to your computer and use it in GitHub Desktop.
Save hassox/260853 to your computer and use it in GitHub Desktop.
var sys = require('sys')
var content = "Fastest Node I can do";
var headers = {'Content-Type' : 'text/plain'};
http = require('http');
var count = 0;
http.createServer(function(req, res){
count++;
sys.puts("Count: " + count);
res.sendHeader(200, headers);
res.sendBody(content);
res.finish();
}).listen(8000);
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