Skip to content

Instantly share code, notes, and snippets.

@bavey
Created July 20, 2013 16:49
Show Gist options
  • Save bavey/6045677 to your computer and use it in GitHub Desktop.
Save bavey/6045677 to your computer and use it in GitHub Desktop.
Setup a simple Node.js server
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/html'});
response.end('<html><body>' + request.url + '</body></html>');
console.log(request.url);
}).listen(3000, 'localhost');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment