Skip to content

Instantly share code, notes, and snippets.

@reynish
Created January 8, 2016 10:13
Show Gist options
  • Save reynish/7ec33c4eb81b1d198577 to your computer and use it in GitHub Desktop.
Save reynish/7ec33c4eb81b1d198577 to your computer and use it in GitHub Desktop.
Really simple node server
var http = require('http');
var port = 9000;
function handleRequest(req, res){
res.end('I\'m alive');
}
var server = http.createServer(handleRequest);
server.listen(port, function(){
console.log('Server is running on http://reynishpi:'+ port);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment