Hosting a monorepo with a Vite/Svelte Front and and a Fiber Backend

I am trying to host my monorepo application within railway however I am facing some issues when trying to deploy. Should i be using npm run dev as my run command? I was thinking of creating two railway instances one for the front end and the other for the back end while setting each respective root directory but I am not sure if this is the best option
- Should i be using npm run dev as my run command?
no you shouldn't, see the " Why use Caddy when deploying to Railway?" part of this templates readme https://github.com/brody192/vite-react-template

- I was thinking of creating two railway instances one for the front end and the other for the back end while setting each respective root directory but I am not sure if this is the best option
this would be the currect way to go about it!
thank you! also for the hobby plan, is there a way to set a upper bound limit on charge fee?
there is not, but if you enable usage alerts in your account settings youll get an email when you go one cent over 5$ lol
after reading i do not quite understand
when i initially used npm run dev as the deploy command it passed, however nothing was exposed to the internet
simply copying the nixpacks.toml and Caddyfile into your vite project should be enough
will i then be able to leave both build and start commands empty?
if i were to use npm run dev as my deploy command, do you know how I would expose it to the internet?
again, do not use that command
please use the nixpacks.toml and Caddyfile from my template repo
you should be able to
wanting to follow up, did you have any success?
I did, added the 2 files and it magically worked. I am not sure how but i am amazed. thank you so much!
how does the Caddy file know what to do
I recommend you read that repositories readme, and read the caddyfile itself

Looking for more? Join the community!

Recommended Posts
Unexpected timeouts and slow downsHey guys! I'm writing this post since we've been experimenting some slow downs and timeouts during tconfigure variable in VM ARGUMENTSI would like to know how do I create a variable "VM Arguments" in the railway environment? currentluhmm i think i filled the entire disk somehowservice id: 66b587c8-3c50-4dd0-8dfa-394ade04a0eci want to deploy a wordpres, is it possible?project id fb928ae2-62f0-4f8f-be68-9f7902efbebdBilled per usage plan with carryoverHey guys, I'm currently on a usage based plan but my app is only projected to use $1.70/month. Will How to use the Kafka project?I'm relatively new to Kafka and I want to publish and consume events to the Kafka running in a kafkaCannot login to Railway.app this morningHere's what I'm doing to login: I go to railway.app, and select Login enter my email address and preRelative path issueI am trying to read some Json files and parse them with one of my services. Locally it works fine. Can't run Railway CLI down command with project tokenhey , it is possible to run the railway down command with railway project token without logging in. Ruby on Rails Deployment with database and redisi had a few questions about linking my database and redis server within railway app ... I tried but Lost all my 20$ credits out of no whereSo i just got an email saying my projects needs 3$ in credits, but suddenly when i check? my whole 2any reason why my usage suddenly jumps to 4GB when there are no tasks running?The app had no requests for for the entire day but the usage jumped, any reason why this could happei want to dowload my post gre db locallyhow can i dowload my post-gre db locallyCloudflare custom domain not workingI just upgraded the api for Cloudflare, but the custom domain is no longer workingError: Unsupported Gradle version: 8============== Using Nixpacks ============== context: 78ee202a04734b630f61d71bea3f81cd  NixpacksOSError: libheif.so.1: cannot open shared object file: No such file or directoryHello, I have tried everything i can to get my django project deployed, the build completes, but depFlask app not workinghey there am very new to railway, i would love to get some help, I am not familiar with hosting a weAverage Cost of Ghost CMS Blog?Hi so I've recently moved over to Railway.app, after hearing great things about it and getting boggewebhook outdated docs and issuesHello First of, https://docs.railway.app/diagnose/webhooks this documentation seems outdated. I'm Configure GitHub PATHow do I configure my GitHub PAT (Personal Access token) while deploying my nestJS app on railway?