Try socket = io.connect(http://54.186.131.77:4545);
instead
Socket.io resource not found: "/socket.io/1/?t=..."
-
17-07-2023 - |
Pergunta
I'm in the process of transforming my first node / socket.io app from working locally, to working remotely, on a server.
I've launched the socket.io server (successfully):
var socket = require("socket.io").listen(4545);
And linked the client to it (successfully):
<script src="http://54.186.131.77:4545/socket.io/socket.io.js"></script>
But I'm now getting this error, and I'm not sure what it means or how to fix it:
GET http://officeball.biz/socket.io/1/?t=1399501542907 404 (Not Found) socket.io.js:1659
Socket.handshake socket.io.js:1659
Socket.connect socket.io.js:1699
Socket socket.io.js:1551
io.connect socket.io.js:94
(anonymous function) client.js:257
And at client.js:257
is:
var socket = io.connect();
It seems to be a common scenario
What could be the cause of this resource not being found?
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow