This is a POC for demonstrating the communication between express-nodejs server and the browser client.
- Express ^4.16.3
- Socket.io ^2.0.4
Client
Client uses socket.io 2.0.4 from CDN
-
First, you need to install the dependencies of
nodejs
npm install
-
Load the
index.html
in the browser and open the developer console. -
Run the
server.js
node server.js
Click on the message
button and check the message both on the browser console and server
MIT