#Where do I place my code to correctly listen for port 8080?

15 messages · Page 1 of 1 (latest)

lapis drift
#

Are you sure you should listen on localhost at gcp? usually you'd do something like 0.0.0.0 for listening on all interfaces

silk frigate
lapis drift
#

yuh

silk frigate
#

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.

lapis drift
#

oh wait you're doing that later

#

totally missed your ListenAndServe line

silk frigate
#

Yeah, is that part in the right place?

lapis drift
#

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

silk frigate
#

should I remove router.Run()?

lapis drift
#

Try

silk frigate
#

trying it again and looks like the same thing is going to happen

lapis drift
#

Does the docker container work locally?