build timeout

ecdub27TRIAL

a year ago

I can't really understand where i am going wrong, I am updated dependencies and everything seems to be in working order. it supposed to be the miniest of projects to show I am aware of how to use a client server and use a rest api. You can clone the repo run cd to LFC npm run dev it will start the client and server. I upload the most recent repo to github and it should run

View Deploy details

ⓘ Deployment information is only viewable by Project members and Railway admins.

20 Replies

a year ago

Are you able to share this GitHub repo?


ecdub27TRIAL

a year ago


a year ago

This project has quite an unoptimized project structure, let me see if I can fix it.


ecdub27TRIAL

a year ago

for sure let me know how I can fix it


a year ago

I'll see about making a PR, and then I will follow up with deployment instructions.


ecdub27TRIAL

a year ago

thank you let me know if theres anything you need from my end


a year ago

You were trying to run your frontend and backend in one service, if not done properly this can cause a lot of issues, you unfortunately were not doing it properly, so I took the easier route and configured your service as an isolated mono repo.

Here is the PR with those changes - https://github.com/ECdub27/LFC/pull/1

To deploy this isolated mono-repo you will need a Railway project with two Railway services in the same project -

A service named Frontend and a service named Backend

Both of these services will deploy from the same repo.

The Backend service will have its root directory set to /backend

The Frontend service will have its root directory set to /frontend

The root directory setting is found via the service's settings page.

On the Frontend service, you will need a VITE_BACKEND_URL service variable set to https://${{Backend.RAILWAYPUBLICDOMAIN}}

Ask if you need clarification on anything that I didn't already cover.


ecdub27TRIAL

a year ago

so I would set the vite backend url to the proxy i set?


a year ago

Nope, the proxy is not involved in anyway at all, In the message above I said what to set that variable to.


ecdub27TRIAL

a year ago

how am I going to set up two different services? I merged all the changes but I guess I am having a hard time figuring out where These two apply?


a year ago

As mentioned, To deploy this isolated mono-repo you will need a Railway project with two Railway services in the same project, Both of these services will deploy from the same repo.


ecdub27TRIAL

a year ago

okay so I am going to need to set the path for each, I just dont know where that setting is… I have not use railway before


ecdub27TRIAL

a year ago

wait hold tight I think I understand


ecdub27TRIAL

a year ago

what is the difference between the keep unexposed, add domain and custom domain?


a year ago

The root directory setting is in the service settings.


a year ago

You want to be able to access both of these publicly so you will want to add a domain.


ecdub27TRIAL

a year ago

yes, this was helpful, I am getting a cors error i suspect its from the env variable not being sent right. I confused on the fix because I am setting the url to where my port is


a year ago

Please don't modify the files I have created such as the .env.local file, I had set it up correctly and you changed it to a completely wrong value. Revert the changes, please.

Give the docs for the cors middleware a read -

https://expressjs.com/en/resources/middleware/cors.html


ecdub27TRIAL

a year ago

I have the right cors configuration…. ill just dig on it thanks a ton Brody!


a year ago

I have the right cors configuration

After looking at your code, you do not, please read the docs page I sent.

Additionally, please revert the changes you have made to the .env.local file.


build timeout - Railway Help Station