In which path should I install socket.io for node.js programming. should I install it in the same path as that of node.js ?
Your best approach is to use npm
to install your packages:
npm install socket.io
This will install it in the folder where you run it for that specific project.
If you want it to be installed globally for all your projects:
npm install -g socket.io