This sample was done for a socket.io presentation with a chat sample live coding at the Cooperative State University Baden-Wuerttemberg Heilbronn.
Slides can be viewed at Speaker Deck.
- Install Node.js.
- After installing Node.js, execute
npm i
in the root of this repository to install socket.io dependency.
To run the sample you need to start both client and server:
npm run start-server
starts a server onhttp://localhost:3000
.npm run start-client
starts a static file server onhttp://localhost:8080
.
After starting both, go point two browsers to http://localhost:8080
. They connect to the WebSocket server allowing to send very simple chat messages. Enjoy!