Deploy React Router with Risved
Requires Risved 0.22.0 or newer.
Risved detects React Router framework mode through @react-router/dev. Using only the react-router routing library does not select this template.
Build and start
Use server rendering and a package.json build script of react-router build. Install @react-router/serve as a production dependency.
Risved copies the build output and production dependencies, then runs the React Router app server
against build/server/index.js using Node.js.
Server configuration
The template sets NODE_ENV=production, HOST=0.0.0.0, and PORT=3000. The host port assigned by Risved is separate from this internal port.
If you use a custom Express server, set a matching start command and ensure its files are included
under build. SPA-only builds are rejected by the default server template. To serve
SPA output, provide a custom start command and include its static server as a production
dependency.
See the official deployment guide.