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

18 messages · Page 1 of 1 (latest)

native minnow
#

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

grand ginkgoBOT
#

Project ID: 4a299107-d7aa-41fc-8de7-34c9d4071a4d

heavy sequoiaBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

native minnow
dusty adder
#
  • 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!

native minnow
#

thank you! also for the hobby plan, is there a way to set a upper bound limit on charge fee?

dusty adder
#

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

native minnow
#

when i initially used npm run dev as the deploy command it passed, however nothing was exposed to the internet

dusty adder
#

simply copying the nixpacks.toml and Caddyfile into your vite project should be enough

native minnow
#

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?

dusty adder
dusty adder
dusty adder
dusty adder
#

wanting to follow up, did you have any success?

native minnow
#

how does the Caddy file know what to do