Skip to content
Simple Chat Server using node.js with multiple dynamic rooms
HTML JavaScript CSS
Branch: master
Clone or download

Latest commit

Latest commit f1ec181 Apr 26, 2018


Type Name Latest commit message Commit time
Failed to load latest commit information.
.c9revisions Updated Readme May 28, 2012
public Added separate css file for the specific styles (not bootstrap related) May 29, 2012
routes Inital commit May 27, 2012
views Added functionality to scroll to bottom if the chat has become too lo… May 29, 2012
.DS_Store Inital commit May 27, 2012
.gitignore Inital commit May 27, 2012
.settings Updated Readme May 28, 2012
LICENSE Added License May 27, 2012
Procfile Inital commit May 27, 2012
README Update README Apr 26, 2018
README.MD Update README.MD Apr 26, 2018
app.js Updated Readme May 28, 2012
package.json Inital commit May 27, 2012


A Simple Chat Server

A simple chat server build entirely with node.js a test server is available at room id It can be anything you want eg: Then share that URL with your friend so that they can join your room.

How to use:

  1. You must have node and npm installed
  2. Download the source then in terminal type npm install to install the dependencies.
  3. Then type node app.js to run the app
  4. Go to localhost:3000/unique+id eg http://localhost:3000/12 12 is the dynamic room which you've created, similarly you can create any number of rooms when someone visits http://localhost:3000/12 they'll get connected to your room i.e 12


  • Dynamic Chat Rooms
  • Users online in a chat room
  • Mobile Support (iPhone, iPad - mobile webkit tested)


  • Delete the room from the array when no users are online
  • Create a admin interface to view all the users connected and active rooms
  • Create a index page that allows random generation of unique urls

NOTE: Security Issue here is no guarantee or warranty associated with this software and if there are any security loop holes then I am not responsible. A possible implementation to solve this problem would be to remove socket.emit("adduser"), and storing the username in the client session storage and allow the server to fetch the username from the session storage (or a cookie).

Another problem is when the user sends message, it directly calls the server, to prevent this we can send the message as "post" to a specific url and the server can fetch the message from the response.

I am working on another project right now otherwise I'd have fixed it myself, but I'll fix it in couple of days.

You can’t perform that action at this time.