New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy can't connect client to endpoint #355
Comments
You must ensure that your colyseus server is correctly exposed to the internet. Localhost will not work at all, as the browser will only try to connect to locally hosted servers. |
@wrigggy Thanks for reply. I did the steps under "Nginx configuration" from the link you sent. When I ssh into my droplet and run it the output is I'm still unsure on what endpoint string should I put in the client in this line below as it's seem to be what's not working
|
You need to find the external ip address that your droplet is accessible with, and substitute it for localhost.
You should find it somewhere in your digital ocean dashboard. EDIT: I'm assuming that you aren't using a domain name that is pointing to your droplet, in which case, you would just use the domain:
|
I still get I must've done something wrong in the nginx setup, I'll look better into it. Thanks for the help and directions, it helped! EDIT: Just noticed that I included the port, tried without it and it worked! |
My error was that I was including the port with the IP of the droplet, removed it and it worked. I'll close the issue now. Thanks for the help @wrigggy! |
Hey, I'm having issues connecting the client to WS when deploying.
I'm using Node + React and for dev I use
const client = new Client('ws://localhost:2567');
and works fineNow I created a droplet in Digital Ocean, created a static build of the client and put it on server under build folder and serve like that:
But when I access it on the browser I get connection failed. I tried localhost and the ip of the droplet but no success, the error on browser console is:
POST http://localhost/matchmake/joinOrCreate/life_room net::ERR_CONNECTION_REFUSED
Anyone know what endpoint or setup should I use to make it work? Thanks
The text was updated successfully, but these errors were encountered: