Skip to content

Instantly share code, notes, and snippets.

@sayar
Created March 22, 2015 18:04
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 sayar/a3518e26176a45e14aa2 to your computer and use it in GitHub Desktop.
Save sayar/a3518e26176a45e14aa2 to your computer and use it in GitHub Desktop.
Hands-on: Build a Node.js-powered chatroom web app | Part 1: Introduction to Node.js
var http = require('http');
var port = process.env.port || 1337;
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello World\n');
}).listen(port);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment