Socket.IO using node.js and express

85f2b927bffe54c0d3c00cbfa1d9a1e3915d086e_main_hero_image

In node.js Socket.io enables real time event based communication. What that means is that we can communicate to the server from the client and in return the server can talk back to the client. Socket.IO uses WebSockets when it can and has fail overs if the browser does not support it.

Step by Step implementation of socket.io using node.js.

Step 1: In first step I am assuming that you have already created the project using express.js and node.js. If you didn’t do that then please read my previous blog and create the project. After that just install socket.io module.

Step 2: Now go to app.js there we will require socket.io and connect socket with our server.

Read more about Socket.IO using node.js and express visit Findnerd.

Advertisements
Socket.IO using node.js and express

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s