R
Railway16mo ago
ferret

trouble exposing a go app

my app is listening on 0.0.0.0:$PORT, the port is exposed in the dockerfile, and it's working locally but it seems it isn't exposed on railway.
23 Replies
Percy
Percy16mo ago
Project ID: 5c0858c1-2ed6-476a-a131-80a111e5c11a
ferret
ferret16mo ago
5c0858c1-2ed6-476a-a131-80a111e5c11a
Brody
Brody16mo ago
oh my specialty
ferret
ferret16mo ago
yes
Brody
Brody16mo ago
what kind of go app? chi?
ferret
ferret16mo ago
yes
Brody
Brody16mo ago
do show me the code that listens
ferret
ferret16mo ago
Brody
Brody16mo ago
funky ":" + os.Getenv("PORT")
ferret
ferret16mo ago
yes i know i just like using sprintf i'll try that though
Brody
Brody16mo ago
Sprintf is pretty neat
ferret
ferret16mo ago
yes now it works interesting
Brody
Brody16mo ago
hehe
ferret
ferret16mo ago
what changed
Brody
Brody16mo ago
who knows
ferret
ferret16mo ago
okay lmfao
Brody
Brody16mo ago
not me, all I know if what does work not specifying the IP just works, even for communication over the private ipv6 only network
ferret
ferret16mo ago
ferret
ferret16mo ago
this was in my other app and it works on railway idk at least it works now
Brody
Brody16mo ago
this is the code I use, so I put it in railways docs https://docs.railway.app/troubleshoot/fixing-common-errors#go--nethttp
ferret
ferret16mo ago
ah
Brody
Brody16mo ago
alright all good?
ferret
ferret16mo ago
yep
Want results from more Discord servers?
Add your server