Socket.io Basics
Start a new project with npm init
.
Use npm install --save jquery socket.io
to get your node modules.
Create a server.js
file to run your node server.
Create an test-socket.html
to use for your client.
Key takeaways from this study session are that you are creating an open channel with an emitter and listener at each point. On the server it looks like this:
On the client the corresponding handlers look like this: