R
Railway2mo ago
Vijay

502 error

I have created two services for my saas product. One for my front end and another for backend. Deployment is successfull, but when I try to launch the front end URL I see 502 in the browser console. I tried troubleshooting vite-config, .env, package.json, railway.json and environment variables, but not luck. I can share logs if required. Any thoughts ?
Solution:
you are likely running a development server. https://github.com/brody192/vite-react-template copy the nixpacks.toml and caddyfile from this repo into yours....
Jump to solution
5 Replies
Percy
Percy2mo ago
Project ID: 5104cef6-f495-4661-8070-a517d5ab0d86
Vijay
VijayOP2mo ago
5104cef6-f495-4661-8070-a517d5ab0d86
Solution
Brody
Brody2mo ago
you are likely running a development server. https://github.com/brody192/vite-react-template copy the nixpacks.toml and caddyfile from this repo into yours.
Duchess
Duchess2mo ago
New reply sent from Help Station thread:
I had the same issue deploying my frontend, if you check the logs, I was missing "--host" and it's working now."preview": "vite preview --host"I never saw this mentioned anywhere in the help section.
You're seeing this because this thread has been automatically linked to the Help Station thread.
Brody
Brody2mo ago
Please do not run a development / preview server, that will cost you a lot and it is very unstable. Please open a new thread so we can get you sorted with a production server. Its not mentioned because it should never be done.
Want results from more Discord servers?
Add your server