I have just started with socket.io, its giving JS Error on client page
io is not defined
How to fix this ?
If your server listening on port 3000 for example and your index.html connect on localhost:3000 then it will fail to include the local libraries on that port. To solve this problem, you should have already installed a normal server for example xampp and include the full url for your library to be served from xampp into your page for example : //localhost/my-project/node_modules/socket.... or just include it from cdn or use socket = io.connect('http://localhost:3000'); and load your page from normal server for example xampp