npx create-rasengan@beta --kind futon
GETTING STARTED
Installation
Futon ships as a single zero-dependency package. You'll also want a runtime adapter from @rasenganjs/runtime to actually bind a port — Futon itself only turns a Request into a Response.
Requirements
- Node.js 18+ (for the Web
Request/Response/Headersglobals), or Bun / Deno / Cloudflare Workers. - An ESM project — Futon is published as
"type": "module".
Installation
Automatic Installation
The fastest way to start a new Futon project is with the create-rasengan CLI, which scaffolds a working project for you. Futon scaffolding shipped in a newer release than what create-rasengan@latest currently points to — use the beta dist-tag to get it.
- What would you like to name your project? - What kind of project would you like to create?
cd my-app npm install
npm run dev
The scaffolded project is a minimal Futon app wired to NodeDevAdapter — a / route, a /health route, and an onError handler, ready to extend.
Manual Installation
This method is not recommended for beginners. It is recommended to use the automatic installation method above.
npm install @rasenganjs/futon @rasenganjs/runtime
If you're building a full application with controllers and dependency
injection, install
@rasenganjs/server instead — it
depends on Futon and Runtime for you.
Package Layout
Futon's main entry (@rasenganjs/futon) exports everything except one thing:
import { fileUpload, MemoryStorage } from '@rasenganjs/futon'; // diskStorage is NOT in the main entry — // it imports node:fs, which must stay out of WinterCG/workerd bundles. import { diskStorage } from '@rasenganjs/futon/upload/disk';
See Storage Engines for why diskStorage lives behind its own subpath.
Verifying the Install
Create a minimal handler and run it in-process, without a server, using Futon.fetch() directly:
import { Futon, json } from '@rasenganjs/futon'; const app = new Futon(); app.get('/', async () => json({ ok: true })); const response = await app.fetch(new Request('http://localhost/')); console.log(await response.json()); // { ok: true }
This is exactly how Futon's own test suite works — no HTTP server required to exercise the pipeline.
