I currently have a project which uses Flask-SocketIO as the backend and a separate client that interacts with the Flask-SocketIO server. Everything is working when I run the server on my local machine. However, when I run the Flask-SocketIO server on a remote server via SSH and try connecting to the host IP address, the connection doesn't seem to work.
The flask-socketio server seems to run fine on the remote server machine as I can see things being printed into the console (running some machine learning models with tensorflow), but I just don't seem to be able to connect to it from the client.
So my main questions are:
What could be the reason why I'm unable to connect to the server remotely?
How exactly can I set up load balancing with nginx? I have looked at the documentation (https://flask-socketio.readthedocs.io/en/latest/#deployment) but I'm still unsure as to where to start.
Currently the project is configured to use the default server, using
if __name__ == '__main__':
socketio.run(app, port=5000)
I connect to it using
const socket = io('http://[ip address]:5000');
It works when I do
const socket = io('http://localhost:5000');
My server is hosted with DigitalOcean running Ubuntu
Any help would be greatly appreciated!