boardgameio/boardgame.io

Deployment issues with ngrok (or other tunneling)

sridharraman opened this issue · 0 comments

Hi, I am building a multi-player game using vue.js as the front-end. I have been able to get the client and server running smoothly in my local machine. I wanted to know what would be the best way to demonstrate the capabilities of the game to my internal team before deployment.

This is what I tried. I used ngrok to tunnel to the port that the client is running in, and left the server running at localhost:8000. This works fine, but only in my local machine. For outsiders, localhost:8000 is obviously not reachable.

So I tried to use localtunnel to the port that the server was running in, but this is the error I get when I go to the client page:

https://clever-steaks-occur-xxxxxxx.loca.lt/socket.io/?EIO=4&transport=polling&t=OTn9tLk
[HTTP/2 511 Network Authentication Required 2714ms]

I wasn't sure what network authentication this was about. Any pointers?

To give more information, if URL_1 is the link that ngrok gives me, and URL_2 is the link that localtunnel gives me, the error when I go to URL_1 is the own shown above: <URL_2>/socket.io, etc.

I am wondering if I have made a mistake somewhere. In the Server code, under origins, I have provided URL_1 that can access the game server. Is that correct? Should the url in this section be the url where the client is running?

Similarly, in the front-end, when I create the Client, I have given this as the value for the multiplayer parameter: SocketIO({ server: '<URL_2>' }). That is this is the url where the server is running. Is this correct?