#Where do I place my code to correctly listen for port 8080?
15 messages · Page 1 of 1 (latest)
Sorry, when I said localhost, I just mean on my computer. I'm not using localhost on GCP. Are you talking about the router.Run("localhost:8080") ?
yuh
I'm not so sure because I actually had this working this morning and that didn't seem to cause an issue. It stopped working after I tried to update a record in the main.go file.
I guess I can try and re-deploy it without the localhost in there.
https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-go-service
Here they do ":"+port
oh wait you're doing that later
totally missed your ListenAndServe line
Yeah, is that part in the right place?
Yeye, but iirc, you're doing router.Run up there, which should bind to localhost:8080, and then later you're doing listenAndServe on the same interface
should I remove router.Run()?
Try
trying it again and looks like the same thing is going to happen
damn
Does the docker container work locally?