The complete annotated source code is also available.
This project is a simple 'hello world' introduction to using node.js and socket.io for making real-time applications, it is meant to be a stepping stone for understanding various concepts of node.js as well as a few common workflow patterns.
The server is leveraged on top of express.js, for simple server creation and setup. The jade template engine is used to create dynamic HTML on the fly, and finally, socket.io is used as an abstraction layer on top of websockets to provide the real-time communications.
This is the second part of a node.js introductionary tutorial, the first part can be located at node01100101.
This project depends on Node.js and the Node Package Manager
(npm). If you don't already have these installed, grab the latest. Node
releases can be found on the download page.
NPM can be installed with a script:
curl http://npmjs.org/install.sh | sudo sh
The project can be installed by cloning this repo into your project.
git clone git://github.com/sorensen/node-chat-demo.git
To install the project dependancies, you can simply use NPM to do a one-line install for each related package.
npm install express npm install jade npm install socket.io