A demo app for websockets using express and socket.io library.
Basic app which shows how to use socket.io to send and receive messages.
Pre-requisites: Node JS
Run the app by running below command:
$ node index.js
In terminal you should see

Then launch in browser:
http://localhost:4000
And browser will have below output

How to Test: Enter Username. Enter Message. And you should see in the middle screen your name with message.
Open another browser and enter the Username and message.
Now when any message is typed from one user it will be shown in both the users window.

And in the command prompt you will see below logs:

In above logs you would see websocket connected line for each user browser windows. For each message sent by a user a log line will come.