I had previously tried setting up Nginx with a Droplet but wasn’t successful. I deleted the Droplet and then deployed my app from the Apps service. The app is live but I’m getting the error:
“WebSocketClient.js:13 WebSocket connection to ‘wss://website.io:8080/ws’”.
Is it possible that some bad configuration from the Droplet and Nginx was leftover and is causing this conflict?
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hi there,
I think that when instantiating the web socket, you should not add the port as it is not publicly exposed on the App Platform.
Instead you should do something like this:
Here is a great step by step tutorial that covers the whole process specifically for the App Platform:
UPDATE:
It looks like that this is a standard thing for some React apps:
What you have to do is to define an environment variable in your app platform and define the
WDS_SOCKET_PORT
variable and set it to443
rather than the default value.You can check that this would already work by visiting your website and in the web console run:
Let me know if you have any questions!
Best,
Bobby