R
Railway•9mo ago
lotario

Deploying a React app with serve (CRA/Vite)

Hey! Looking for a guide that helps with deploying a React app using serve instead of the default config. Thanks!
Solution:
all my examples now use caddy, its a far more efficent web server than serve is, uses much less memory too! https://github.com/brody192/vite-react-template copy the nixpacks.toml and Caddyfile from this repo into yours. if you have any custom build or start commands set in the service settings, please remove them....
Jump to solution
6 Replies
Percy
Percy•9mo ago
Project ID: N/A
lotario
lotarioOP•9mo ago
N/A
Solution
Brody
Brody•9mo ago
all my examples now use caddy, its a far more efficent web server than serve is, uses much less memory too! https://github.com/brody192/vite-react-template copy the nixpacks.toml and Caddyfile from this repo into yours. if you have any custom build or start commands set in the service settings, please remove them.
lotario
lotarioOP•9mo ago
works great, thank you very much!
Brody
Brody•9mo ago
let me know if that works for you
lotario
lotarioOP•9mo ago
it does it builds and deploys really fast too 🙂 how do I mark this thread as solved and select your answer?
Want results from more Discord servers?
Add your server