'how to install Socket.io over node.js?

I will need any help i can get to install socket.io over node.js for server.

I have already installed the node from the site. I am interested in step- by step(directory,e.t.c) as i am new to programming. Thanks in advance James



Solution 1:[1]

The easy way to install socket.io is with npm (Node Package Manager). npm is the default package manager for Node.js.The current Windows installer from nodejs.org will install npm along with Node.js. In Windows OS, open the cmd window and type:

npm install socket.io  

This command will install socket.io in the local node_modules folder, which is owned by the current user.

npm can also take optional flags which are described at the npm-install webpage of www.npmjs.org.

In order to test if socket.io is working, try this tutorial: Get Started: Chat application which has been linked to by Beterraba in a comment below your question.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1