a month ago
Trying to deploy this project but it returns the same error each time:https://github.com/chizoalban2003-beep/Git/agents?author=chizoalban2003-beep
Attachments
4 Replies
Status changed to Awaiting Railway Response Railway • about 1 month ago
Status changed to Open Railway • about 1 month ago
a month ago
1.Make sure the app listens on process.env.PORT not a hardcoded port number
2.Add a /health route that just returns a 200 status
3.Scroll up in the build logs above the healthcheck section and check if the app is crashing before it even starts,there might be a missing env variable or broken import causing it
a month ago
Need more info, this could be generic, I can see you already have the /health route, could be app is crashing, or port is not configurated properly
a month ago
build is fine its failing at the healthcheck which usually means the app never started properly
either it’s crashing before app.listen() (check logs above that part), or it’s not binding right
make sure you’re doing:
app.listen(process.env.PORT, '0.0.0.0')
if you don’t see any “server started” log before the healthcheck then its probably crashing on startup
a month ago
Besides the other users suggestions, try manually setting a PORT variable into that service env vars.
See: https://docs.railway.com/deployments/healthchecks#configure-the-healthcheck-port