Click here to Skip to main content
15,888,600 members
Articles / Web Development / Node.js
Tip/Trick

How to Install Socket.io on Node.js on Windows

,
Rate me:
Please Sign up or sign in to vote.
1.67/5 (2 votes)
12 Oct 2015CPOL1 min read 34K   3   2
Installing socket.io on node.js on Windows 8

Introduction

This tip is about installing socket.io on node.js on Windows 8. We (me and my colleague Ahmed Damak) worked on this as part of a project in the fourth year in university. There is no good install guide for socket.io on node.js on the internet, so we decide to make it happen.

Background

Node.js can make working with Websockets very easy when using the Socket.io library. Using websockets, you can easily build realtime applications like chat box. Today, we will show you how to easily install the library to build a simple program using Node.js and Socket.io.

Note: To go through this tip, you will need to download Node.js.

Install Guide

You create a folder that will encapsulate the node.js server part of the project as socketioexemple folder name. Put yourself in the project file created earlier "socketioexemple" and run the command:

npm install socket.io 

This command installs the project folder in the library socket.io. In this case, it is only available for the project.

Image 1

After we did the test node app.js, make sure to place it in the folder in which the script was created app.js. But the console will display such error due to lack of other files. You should follow the approach given below.

Note: After the launch of each installation must verify connectivity of the server where the files are missing.

Image 2

install socket.io-parser

Image 3

Image 4

Install debug

Image 5

Installation has-binary-data

Image 6

Image 7

Installation de socket.io-adapter

Image 8

Image 9

Installation module ent

Image 10

Image 11

and for the last step, we made a connectivity test:

Image 12

Note: If you noticed whenever you must check if there is a module does not exist.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Tunisia Tunisia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Written By
Tunisia Tunisia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralNice try, but catches ! Pin
marquez712-Mar-17 23:16
marquez712-Mar-17 23:16 
Questionwhere's the article? Pin
FatCatProgrammer16-Nov-15 8:09
FatCatProgrammer16-Nov-15 8:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.