Skip to content

Instantly share code, notes, and snippets.

@JimDennis
Created October 28, 2014 12:31
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 JimDennis/20a63b95ca8929d442bc to your computer and use it in GitHub Desktop.
Save JimDennis/20a63b95ca8929d442bc to your computer and use it in GitHub Desktop.
# From: http://nodetuts.com/01-node_intro.html
var http = require('http');
var server = http.createServer();
function handleReq(req, res) {
res.writeHead(200, {'content-type':'text/plain'});
res.write('Hello, Node.JS');
res.end();
};
server.on('requst', handleReq);
server.listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment