R
Railway13mo ago
luci

Trying to deploy Express API but "Application failed to respond"

I have a simple Express API. I imported it into Railway using Github import. Then Railway built and deplyed it. I dont see any errors in either build or deploy logs so things look good. ( I have attached the build and deploy logs) I then generated a public URL which it generated for me (supademo-assignment-production.up.railway.app) But going on that URL gives me "Application failed to respond". Please help me figure it out. I am pretty new to Railway.
No description
No description
No description
No description
No description
No description
No description
No description
5 Replies
Percy
Percy13mo ago
Project ID: 1746a532-e432-4d7e-bdb9-5fa2fae15a48
luci
luciOP13mo ago
1746a532-e432-4d7e-bdb9-5fa2fae15a48 I see that I havent yet provided .env to the project and that's possibly why I was running into this. Putthing them in Variables and trying again.
Fragly
Fragly13mo ago
Don't use nodemon in production code WHYYYYY it's best to use the port railway provides rather than overriding the variable overriding it is really just a backup in case changing the port an app listens on is too much of a hassle
const port = process.env.PORT || 3000
const port = process.env.PORT || 3000
just pop something like that into your code more info on the reason you're facing this error: https://docs.railway.app/troubleshoot/fixing-common-errors
luci
luciOP13mo ago
Ah yea ... I'll remove nodemon <:Sweating_Towel_Guy:952812083274211348> EDIT: removed cool cool i was able to deploy succesfully after adding the .env anyways loved deploying on railways, good product <:e_verynice:894594276065935360> btw thanks for your help @Fragly
Fragly
Fragly13mo ago
No problem :)
Want results from more Discord servers?
Add your server