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 :)
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.