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
nodejsnpm install -
Load the
index.htmlin the browser and open the developer console. -
Run the
server.jsnode server.js
Click on the message button and check the message both on the browser console and server
MIT