Skip to content

Instantly share code, notes, and snippets.

@coolaj86
Forked from cahlan/gist:4a80fd0752a9f38052af
Last active August 29, 2015 14:26
Show Gist options
  • Save coolaj86/9af4315e90d5506e8b15 to your computer and use it in GitHub Desktop.
Save coolaj86/9af4315e90d5506e8b15 to your computer and use it in GitHub Desktop.
var http = require('http');
var server = http.createServer();
server.on('request', function (req, res) {
// code here
res.end("Hello!");
});
server.listen(8080, function () {
console.log("Listening at http://localhost:", server.address().port);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment