I am making a program where (to make it easier for myself) I am using different ports for different pages. I already have codespaces set up and I do not want to switch to using something else, but I still want to be able to run it however I want, like if I'm programming at home when I have access to VS Code desktop. Is there a way I can have it connect to the different ports correctly using codespaces and other things?
I have tried the following code:
HTML
let socket = io(":3001");
(that file is being hosted on port 3000)
The code worked perfectly before I started using the same server to host the clients but different servers for the server-side sockets.
I have also seen documentation on namespaces and rooms. If I need to use those, how do I use them securely and which one should I use?