Hey all, I’m currently working on my project “Hidy”:
I’m using a NodeJS server to manage connections to the server.
When a client connects, the server picks up the connection and prints out the ID, however, there is supposed to be a message sent to the server from the client on start that is never sent. There is also a heartbeat supposed to be sent to the client from the server that is never sent. I’m getting an error in console: “VM455:1 GET net::ERR_CONNECTION_TIMED_OUT”

Any help would be great! Thanks!

The port 3000 is internal to the project container. The client should connect to the same https port as the page is served from, so either 443 or just leave out the port.

An alternative is connect to window.location, which makes your project more robust if it changes name.

Good luck!

EDIT - window.location is actually the default, so the client doesn’t need to use a url at all!

443 worked as the port, however window.location didn’t. Any idea why? Is this not how I should be using it? socket = io.connect('' + window.location);

Some alternatives:

socket = io.connect('');
socket = io.connect('');
socket = io.connect(window.location);
socket = io.connect();