Wednesday, March 28, 2012

Yet another NodeJS chat prototype

Technologies used :
Nodejs
Socket.IO
Express Framework for Node
MongoDb

Disclaimer : The code / concept here is pretty novice, good for people just starting with nodejs but needs a  lot of refinement.

Installation : You can download nodejs installer according to your OS from nodejs.org or use your OS repositories for a copy of nodejs supported by your OS. The rest of your packages viz socket.io and express are stored in the nodejs repositories and can installed using the following commands:

> npm install socket.io


 > npm install express

MongoDb can be downloaded from the mongodb.org website and you just have to run mongod daemon to ensure the database service is running.

The code for the chat server is available HERE.

Set the mongodb host and port settings on db_ops.js and on the parent folder run:

> node server.js


You would see something like the following image on the server log:



Open up browsers, connect to the server locally via 127.0.0.1:8024 or use you computers IP address and port 8024 and see the chat in action:



Θ Ω Sushant ♂

2 comments:

  1. In Database we should to know about nodes and its further prototype. Developers are happy from your post. Similarly, when you are want to install a new furniture and get from shop. You can contact to our Residential Movers in Atlanta GA and can enjoy with new furniture along the family.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete

Startup founders cheatsheet (Chief product officer)

Define your goals  The basic definition of "mission" and "vision" of the company is critical when we've past the...