No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



I am reading the book NodeJS In Action( When I follow the chat room example, I find the version of the the example is using is < 1.0, while 1.0 has been rewritten so the example no longer work. I find people raise related question in Stack Overflow without other people really answer, therefore I try to come up a workable solution for that.


Reason for the example no longer work with newer because of 1.x has different member function. For this exmaple I am using "": "^1.4.5"

I also get the code to work with Heroku and here is the Demo

Step for you to run it local

  1. git clone
  2. npm install to run the dependency
  3. node server.js to launch the NodeJS Application
  4. Open browser and go to http://localhost:8000 as I defult the port as 8000

Optional work to get the example work in Heroku / work better

  • Create the Procfile with defining web: node server.js
  • Define the start script in package.json so you only need to launch the app with npm start instead of node server.js


  1. NodeJS In Action
  2. Stack Overflow: Nodejs TypeError: Cannot call method 'on' of undefined