R
Railway4mo ago
tayla

Cloudflare - Application failed to respond

Hello! My app is working with test domain. But with custom it doesn't work. I see "Cloudflare proxy detected", but I get Bad gateway Error code 502 or Application failed to respond pages. How do i fix it? Thx.
Solution:
"start": "node ./dist/server/entry.mjs",
Jump to solution
26 Replies
Percy
Percy4mo ago
Project ID: 841ba519-e06f-4b85-b455-2b2846dd440e
tayla
tayla4mo ago
841ba519-e06f-4b85-b455-2b2846dd440e
Brody
Brody4mo ago
send the railway domain please
tayla
tayla4mo ago
findminiapp-production.up.railway.app
Brody
Brody4mo ago
okay and the Cloudflare domain too please
Brody
Brody4mo ago
what kind of app is this
tayla
tayla4mo ago
Astro SSR
Brody
Brody4mo ago
what is your start command?
tayla
tayla4mo ago
npm start
Brody
Brody4mo ago
what is your start script
tayla
tayla4mo ago
No description
tayla
tayla4mo ago
No description
Brody
Brody4mo ago
your start script is starting a development server, please change it to start the built app
tayla
tayla4mo ago
I will try, thank you, but meanwhile, it works with railway domain somehow?
Brody
Brody4mo ago
its unfortunate that it does, as running a development server would be costly
tayla
tayla4mo ago
unfortunately didn't work
tayla
tayla4mo ago
No description
Brody
Brody4mo ago
im not sure how that related to what i suggested, besides, the build command was already being ran and there was no issues with it
tayla
tayla4mo ago
I'm not sure I understand what you suggested. I tried to deploy with built command. What am I doing wrong? Sorry, i'm a newbie
Brody
Brody4mo ago
run npm run build locally and then show me the contents of the built directory
tayla
tayla4mo ago
No description
tayla
tayla4mo ago
@Brody I uderstood my mistake and found your answer in another topic
Solution
tayla
tayla4mo ago
"start": "node ./dist/server/entry.mjs",
tayla
tayla4mo ago
this command worked Thank you a lot for guiding me!
Brody
Brody4mo ago
no problem!
Want results from more Discord servers?
Add your server