NowJS is a new module for NodeJS that makes realtime apps fun and easy to do – in fact it’s even easier than NodeJS already makes it. Today I’ll show you how to run a chat server (as shown in the example code for NowJS). I’ll be using Ubuntu 10.10 (Desktop) with NodeJS and NPM both installed. If you don’t have NodeJS and NPM installed you can see my article here on how to do that.
[ad name=”Google Adsense”]
Install NowJS via NPM:
$ sudo npm install now
Now go into the examples folder like this and run the server (there are two files in the examples folder: helloworld.html and helloworld_server.js)
$ cd /usr/local/lib/node/now/examples $ node helloworld_server.js
Fire up a couple browsers to this address: http://localhost:8080/