golang application failed to respond

tranielmp8HOBBY

a year ago

Hello I am trying to deploy my go application, but I keep getting this server error: Application failed to respond

err := godotenv.Load()
if err != nil {
panic(err)
}

server := gin.Default()

port := os.Getenv("PORT")

if port == "" {
    port = "8080"
}

[server.Run](server.Run)("0.0.0.0:" + port)

/* .env file */
PORT=8080
I am not sure what to do at this point. thank you for your help. I didn't do any build commands on railway. I just used the default. thank you

2 Replies

a year ago

have at look at this section of the docs page

https://docs.railway.app/guides/fixing-common-errors#go--nethttp


tranielmp8HOBBY

a year ago

Still didn't work. Thanks for the help though. Tried it somewhere else, but the error I got that time was my version of Go was to new or something.


golang application failed to respond - Railway Help Station