Try creating another node.js application that has this single line, and then run it using node.js
var io = require('socket.io').listen(8000);
Then in your browser go to http://127.0.0.1:8000
and you should get the friendly "Welcome to socket.io". greeting. If you get this, socket.io starts up and will serve the socket.io.js file.
The only thing I can think of is that you cannot reference the alternate port in your client file. If you are not using socket.io server on express, which runs on port 80. For now, create a client file with the script source for socket.io set to
<script src="http://127.0.0.1:8000/socket.io/socket.io.js"> </script>
This should be a connection to the socket.io server running on port 8000 and get the socket.io.js file.
source share