简体   繁体   中英

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,etc) as i am new to programming. Thanks in advance James

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM