API REFERENCE

CLI

See CLI and Config & Build for usage and examples — this page is the flat reference.

Commands

rasengan-server dev [flags] rasengan-server build [flags] rasengan-server start [flags]
CommandDescription
devHot-reloading development server (runs the entry file via tsx, restarts on file change)
buildBundles the server for production with esbuild
startRuns the production build produced by build

Flags

FlagShorthandConfig fieldDefault
--port <number>-pport3000
--host <address>host0.0.0.0
--entry <path>-eentrysrc/main.ts
--preset <name>presetnode
--watch-dir <path>watchDirsrc/

See defineConfig for RasenganServerConfig, BuildConfig, and ConfigHolder — the types and cache backing every field above.

logServerInfo()

import { logServerInfo } from '@rasenganjs/server'; function logServerInfo(port: number, host?: string): void; // host default "0.0.0.0"

Prints the startup banner — server name/version, local and network URLs, detected runtime (Bun vs. Node.js), and keyboard shortcut hints (c to clear, ctrl+c to stop). Called internally by bootstrap() once the server starts listening; exported mainly for custom bootstrap flows that bypass bootstrap() and want the same banner.

defineConfig