Skip to main content

Dev Workflow

rapidrest dev

Runs the project locally with hot reload.

rapidrest dev
rapidrest dev --inspect # attach a debugger on localhost:9229
rapidrest dev --docker # assume databases are already running elsewhere
rapidrest dev --port 4000 # prefer a specific port
FlagDescription
--inspectEnables the Node inspector on port 9229
-d, --dockerSkips starting in-memory database servers (use when your datastores are already running, e.g. via Docker Compose)
-p, --port <n>Preferred port to bind to

By default, rapidrest dev reads src/config.ts to see which datastores are configured, starts an in-memory instance of each (no local install needed, see Getting Started), and runs your server via tsx --watch. If the project has React configured, it also runs vite build --watch alongside it. Everything is cleaned up on Ctrl+C.

Ports are found automatically: starting from --port (or 3000 if omitted), RapidREST probes upward until it finds a free one. If you pass --port explicitly and that exact port is already taken, dev fails instead of silently picking a different one — the automatic fallback only applies to the default.

rapidrest start

Builds and starts the project as it would run in production.

rapidrest start
rapidrest start --no-build # skip the build step
rapidrest start --docker # assume databases are already running elsewhere
rapidrest start --port 4000 # prefer a specific port
rapidrest start --bun # run on Bun instead of Node.js
FlagDescription
--no-buildSkip the build step
-d, --dockerSkips starting in-memory database servers
-p, --port <n>Preferred port to bind to — same automatic-fallback behavior as dev, described above
--bunUse the Bun engine instead of Node.js. Requires Bun v1.4.0+; downloads a compatible version automatically if none is installed. See Deployment → Bun.

--bun is only available on start, not dev — the dev workflow's hot-reload tooling (tsx --watch, nodemon) runs on Node.js regardless.

rapidrest build

rapidrest build

Runs the project's build script via the detected package manager, equivalent to yarn build or npm run build from the project root. Takes no flags.

rapidrest dev vs. rapidreact dev

If your project was scaffolded with rapidrest generate server, use rapidrest dev day-to-day. It already runs the Vite watcher for you when the React feature is configured. rapidreact (from @rapidrest/react directly, covered in SSR React → Dev Mode) is a lower-level tool for driving just the SSR dev workflow, useful if you're integrating @rapidrest/react outside of a CLI-scaffolded project.