In order to get Socket.IO running, we need to have at least one client and one server set up to talk to each other. In this recipe, we will set up a basic Node HTTP server with the built-in Node
To get started with Socket.IO, you will need to install Node.js. This can be downloaded from https://nodejs.org/.There is a download link on the Node.js website, or you can get one of the binaries at https://nodejs.org/download/.
Once Node.js is installed, you will need to navigate to the directory where your project is located and create a new NPM package by entering
npm init in your console.
Now, you will need to install Socket.IO. You can use NPM to install Socket.IO by entering
npm install ...