GETTING STARTED

Installation

Automatic Installation

The fastest way to start a new Rasengan Server project is with the create-rasengan CLI, which scaffolds a working project for you. Server scaffolding shipped in a newer release than what create-rasengan@latest currently points to — use the beta dist-tag to get it.

[01]Create a new project
Run the following command to create a new project.
Terminal
npx create-rasengan@beta --kind server
[02]Follow the prompts
If you didn't pass --kind, you'll be asked which kind of project to create — select "server". You'll also be asked to name your project.
Terminal
- What would you like to name your project? - What kind of project would you like to create?
[03]Install dependencies
create-rasengan copies the template files but doesn't install dependencies for you. Move into the new folder and install them.
Terminal
cd my-app npm install
[04]Run the application
Run the following command to start the development server.
Terminal
npm run dev

The scaffolded project includes a rasengan.server.ts config, a root AppModule, and a single HelloController — enough to see a request handled end to end before you add your own modules.

Manual Installation

npm
pnpm
yarn
bun
bash npm install @rasenganjs/server zod

@rasenganjs/server depends on @rasenganjs/futon and @rasenganjs/runtime directly — you don't need to install those yourself. zod is a peer dependency of @rasenganjs/validators (which @rasenganjs/server depends on) — the built-in validation adapter is Zod-based, so install it alongside.

Requirements

  • Node.js 18+, Bun, or a Cloudflare Workers (workerd) target.
  • An ESM project — the package ships as "type": "module".

Configuration File

Create a rasengan.server.ts at your project root:

rasengan.server.ts
import { defineConfig } from '@rasenganjs/server'; export default defineConfig({ entry: 'src/main.ts', port: 3000, preset: 'node', });

See Config & Build for every available option.

Minimal Entry Point

src/main.ts
import { bootstrap } from '@rasenganjs/server'; bootstrap((app) => { app.registerModule({ // See Modules and Controllers for a full example }); });

Running It

Terminal
npx rasengan-server dev

See CLI for the full command reference (dev, build, start).

Introduction
Project Structure