A demo to show how a websocket is implemented on a Node.js server using the socket.io library.
It uses the Express.js and Node.js built-in node:http
module to create the main server.
- Fork this repository
- Run
run npm install
in your terminal. - To start the server, run
npm start
. - You can then connect to the socket server from any socket.io client implementation using either of this url:
ws://localhost:8000
orhttp://localhost:8000
.
Thank you and happy coding!