Reputation: 176
I've coded a server in Node.js using uWebSockets.js and deployed it to Google Cloud App Engine.
The server itself works fine when I run it on the local network but when I try to connect it through the gcloud URL it throws the error (to the client):
received bad response code from server 502
Could it be something to do with the URL itself? The gcloud deploy app
command gives me a https://
url by default, so I’m using var ws = new WebSocket('https://[PROJECT_ID].ts.r.appspot.com');
in my client-side because I assume that the URL will act as a proxy for my WebSocket, but I'm not sure if this is the right way to do it...
Any help/advice appreciated
Upvotes: 0
Views: 272
Reputation: 1420
As @DazWilkin mentioned, WebSockets can be used with App Engine Flexible environment and with Cloud Run.
App Engine standard environment doesn't support this.
Upvotes: 1