Open VitaliyKovtun opened 7 years ago
Wow thanks for this, was pulling my hair.
Now I'm getting a new error:
VM48:161 WebSocket connection to 'ws://cathat.herokuapp.com/socket.io/?EIO=3&transport=websocket&sid=xzv44seT0HkGSJ6UAAAH' failed: Error during WebSocket handshake: Unexpected response code: 400
But everything seems to be working fine, so I guess I'll come back to that
iam getting
WebSocket connection to 'ws://127.0.0.1/socket.io/?EIO=3&transport=websocket&sid=ulyicDBxzzDdEI_KAAAT' failed: WebSocket is closed before the connection is established.
when trying to run the chat on pm2 cluster mode, i think we need to use transport websocket instead of polling? where do i do that?
If you have got http://127.0.0.1:8000/socket.io/?EIO=3&transport=polling&t= You have to write
var Hapi = require('hapi'); var server = new Hapi.Server();
server.connection({ host: '0.0.0.0', port: Number(process.env.PORT) });
var io = require('socket.io')(server.listener);
server.start();