502 error
vjceo
HOBBYOP

2 years ago

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 ?

Closed

4 Replies

vjceo
HOBBYOP

2 years ago

5104cef6-f495-4661-8070-a517d5ab0d86


2 years ago

you are likely running a development server.

copy the nixpacks.toml and caddyfile from this repo into yours.


onerafaz
TRIAL

2 years ago

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.


2 years 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.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...