Socket.io websocket chat example

Example modularized and placed into an Express server

Heroku ready





Notes

Heroku automatically configures port settings

Thus, do not rely on fixed port numbers when deploying to Heroku

Clientside, use:


socket = io();


rather than setting a specific port number:


socket = io(document.domain + ':4100');


Resources

Git: Here
Hosted: Here
Socket.io MIT License: Here
Original Code: Here