Skip to content

Instantly share code, notes, and snippets.

@JimDennis
Created Oct 28, 2014
Embed
What would you like to do?
# 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