GETTING STARTED

CLI

The rasengan-server binary (installed with the package) has three commands: dev, build, and start.

Terminal
npx rasengan-server dev npx rasengan-server build npx rasengan-server start

dev

Starts a hot-reloading development server. Runs your entry file directly via tsx (no build step) and restarts the process whenever a watched file changes.

Terminal
rasengan-server dev --port 4000

build

Bundles your server for production using esbuild. Produces one or both output formats depending on build.formats:

  • single-file — everything bundled into one server.bundle.mjs.
  • directory — one .mjs per source file, preserving your project's structure.
Terminal
rasengan-server build --preset node

start

Runs the production build produced by rasengan-server build — no compilation step, just executes the bundled output.

Terminal
rasengan-server start

Flags

Every command accepts the same override flags, applied on top of rasengan.server.ts and the built-in defaults:

FlagShorthandDescriptionDefault
--port <number>-pPort to listen on3000
--host <address>Host to bind to0.0.0.0
--entry <path>-eEntry filesrc/main.ts
--preset <name>node | bun | workerdnode
--watch-dir <path>Directory to watch in dev modesrc/

Configuration Resolution Order

Lowest to highest priority — later sources override earlier ones:

  1. Built-in defaults (shown in the table above).
  2. rasengan.server.js or rasengan.server.ts in the project root.
  3. CLI flags.

See Config & Build for the full RasenganServerConfig shape, including build output options.

Project Structure
Bootstrap & ServerApp