This example uses node.js and the ws library. Clientside is pure javascript with HTML 5.
- Nodejs
- Npm
Clone the Git Repo.
Install all npm dependencies (ws, requirejs)
npm install
In project directory and a Terminal, to start the websocket server
npm start
Let the Terminal openend so you can see Status messages from the server.
Open the client.html both times in a browser of your choice. Open the Console in both browsers. Click the send test message button to send a test message to the server and the server will broadcoast to all connected clients in realtime!