Practice using Node.js and Socket.io
A basic test with Sockets.io, you can save one socket per session and have usernames. but it errors out after the first and all subsequent ones are null or undefined users.
to run simply cd into the directory and
node app.js