Skip to content

Instantly share code, notes, and snippets.

@rubyonrails3
Created January 29, 2012 19:30
Show Gist options
  • Save rubyonrails3/1700273 to your computer and use it in GitHub Desktop.
Save rubyonrails3/1700273 to your computer and use it in GitHub Desktop.
This is hello World in NodeJs with Socket.IO
var http = require('http'),
url = require('url'),
ios = require('socket.io'),
fs = require('fs');
var server = http.createServer(function(req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('<h1>Hello NodeJs</h1>');
});
server.listen(80);
var io = ios.listen(80);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment