Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

can't get socket.io to load correctly in a cloud run container within an existing project

I have a new path to my site. The new path is deployed with gcloud run deploy. This path is a container and I am trying to get socket.io to work with it. I can only load a CDN in its place currently.

The path of this is "bar" in mydomain.com/foo/bar.

"foo" is the cloud run container, and "bar" is a path of the container. I think this has to be routed in express, in the cloud run container, right?

"bar" is where i want this <script src="/socket.io/socket.io.js> to work.

my paths in the load balancers page in the google console is "/foo" and "foo/bar". Is this correct? I had foo/* and foo/bar/* in addition to the others, but have since deleted them. My reasoning is that the cloud run container is what dictates the routes.

0 2 354
2 REPLIES 2

Can you also provide your Cloud Run logs?

Here is the answer of your question[1]

[1]- https://stackoverflow.com/a/28430495