Skip to content

Instantly share code, notes, and snippets.

@zefhemel
Created October 31, 2011 10:02
Show Gist options
  • Select an option

  • Save zefhemel/1327216 to your computer and use it in GitHub Desktop.

Select an option

Save zefhemel/1327216 to your computer and use it in GitHub Desktop.
Hello world of node.js
var http = require('http');
var server = http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
});
server.listen(process.env.C9_PORT, "0.0.0.0");
console.log('Server running!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment