R
Railway7mo ago
AlanVT

Application failed to respond

No description
No description
No description
No description
15 Replies
Percy
Percy7mo ago
Project ID: N/A
Fragly
Fragly7mo ago
Are you listening on the port railway provides? Take a look at this: https://docs.railway.app/guides/fixing-common-errors
AlanVT
AlanVT7mo ago
the port 8080
Fragly
Fragly7mo ago
You need to listen on the port railway gives you, check the link I sent you
AlanVT
AlanVT7mo ago
ok but where does it says which is the provided port?
Fragly
Fragly7mo ago
It's an environment variable named PORT, please check the link I sent you
AlanVT
AlanVT7mo ago
ok i'll check
AlanVT
AlanVT7mo ago
here?
No description
Fragly
Fragly7mo ago
It doesn't display there by default since it's a Railway provided variable if you're running something like a NodeJS app then you can get the port through:
const port = process.env.PORT || 3000
const port = process.env.PORT || 3000
AlanVT
AlanVT7mo ago
No description
AlanVT
AlanVT7mo ago
but still the same it fixed!!!
Fragly
Fragly7mo ago
You wouldn't want to clarify the port, it's always recommended to let railway give you a random generated one but if you have to use a specific port then that'll work fine too
AlanVT
AlanVT7mo ago
thank you!!!
Fragly
Fragly7mo ago
no problem! although I don';t recommend you specify the port unless there's no other option
AlanVT
AlanVT7mo ago
ok