Application error is your app correctly listening on port?

I deployed initially with connecting to postgres, I got this error, then I connected to postgres still got the same error thinking it might be solved. I don't know what else to do because this is my first time of deploying on railway Project id: 3c7e50eb-3a9a-4657-b42c-265330d10495
13 Replies
Percy
Percy2y ago
Project ID: 3c7e50eb-3a9a-4657-b42c-265330d10495
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Gpower
Gpower2y ago
It's a Django application
jackson
jackson2y ago
check that your project's PORT env var is set to 8000 in railway, unless you have a specific configuration with django that overrides this
Gpower
Gpower2y ago
Thanks. But I am still getting an error after setting it, don't know if I did it correctly, but I will share the image
Adam
Adam2y ago
Your port env variable and the port variable in your code should be set to the same value. If you would like to send your file where the server is configured I can point it out for you
Gpower
Gpower2y ago
I specified the PGPORT on my code env and as well railway env, but I am still getting the error
Adam
Adam2y ago
not PGPORT, PORT please send a screenshot of your error
Gpower
Gpower2y ago
This is the error
Adam
Adam2y ago
Is your PORT variable set?
Gpower
Gpower2y ago
I don't know how to specify Port This is my first time deploying a web app How can I do that please
Adam
Adam2y ago
Under the variables tab, create a variable called PORT set to a 4 digit number make sure your code is either pulling the port from the environment variables or is set to the same number
Gpower
Gpower2y ago
Alright, thanks