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:Jump to 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....
5 Replies
Project ID:
5104cef6-f495-4661-8070-a517d5ab0d86
5104cef6-f495-4661-8070-a517d5ab0d86
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.
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.
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.