I tried cloning the chat example in socket.io tutorial and it just wouldn't work.
Then I installed firecamp and found out that socket.io is at fault.
I typed socket.firecamp.io in the address bar and I got the following error:
Error: xrh poll error
How can I fix it?
Here's the code:
//Connection
const socket = io( "socket.firecamp.io", {
"transports": ["polling","websocket"]
});
socket.on("disconnect", () => {
console.log("socket disconnected");
});
// for more information: https://github.com/socketio/socket.io-client/blob/master/docs/API.md