A simple chatroom webapp using node.js and websockets
Latest commit 8849972 May 12, 2012 @tomds added README
Failed to load latest commit information.
public/static more comments and a spot of light refactoring May 11, 2012
templates use express to serve static files May 11, 2012
Procfile initial commit May 9, 2012
package.json automatic version increment after nodejitsu deploy May 11, 2012
server.js some comments May 11, 2012



This is a really simple proof-of-concept chat app using websockets, written in node.js with socket.io and express. No database involved!

You can see a live demo at http://tomds-chatroom.jit.su/, hosted on nodejitsu, which as far as I can tell from my limited experience, is excellent :)

What it does

As I say, it is a very basic implementation and not a fully-featured chat app. Features include:

  • Send messages to everyone (no private messaging)
  • See who else is connected
  • Change your username (checks for username invalid, in use etc.)
  • Username remembered in a cookie for next time (you get a guest username the first time you log in)

There is no logging or history of any kind; if you reload the page then you lose your chat history. And there's no private messaging or multiple channels.


Assuming you already have node.js installed, go to your checkout and type:

npm install

Then run the server with:

node server.js

You should now have a server running on localhost:8000.


I have successfully deployed this code to nodejitsu and heroku, although I would recommend nodejitsu as heroku didn't seem to work very well, possibly due to dodgy websockets support.