_________ _____ __________ _____ ....... _ ___ \ / _ \ \ / _ \ _ \ | | | | | | / \ / / /_\ | / / /\ | /| / | | | | | | \ _/ | \ | \ / | \ | | | |||||| _ /_| /| / _|__ /| || ____________ / / / / //////
This chat example showcases how to use socket.io
with a static express
server.
-
Open
server.js
and start the app by clicking on the "Run" button in the top menu. -
Alternatively you can launch the app from the Terminal:
$ node server.js
Once the server is running, open the project in the shape of 'https://localhost:3000/'. As you enter your name, watch the Users list (on the left) update. Once you press Enter or Send, the message is shared with all connected clients.