Installation
Install via the CLI or manually add packages.
Play Online
If you want to try RouteCraft in your browser without installing anything, open our examples:
Open on CodeSandbox
Play around with RouteCraft in your browser.
System requirements
- Node.js 22 or later.
- macOS, Windows (including WSL), or Linux.
Create with the CLI
Create a new RouteCraft project:
npm create routecraft@latest <project-name>
Open your project folder in Visual Studio Code:
code <project-name>
Start the development server
Use the project scripts created by the initializer:
npm run dev
You should see your routes start and log output in your terminal.
Production (optional)
Build and start the app:
npm run build && npm run start
Manual installation
Add the core library:
npm install @routecraft/routecraft
Create your first route:
// routes/my-route.ts
import { craft, simple, log } from "@routecraft/routecraft";
export default craft()
.id("my-first-route")
.from(simple("Hello, RouteCraft!"))
.to(log());
Note: The CLI run command executes only JavaScript route files (.mjs/.js/.cjs). If you author routes in TypeScript, compile them to JavaScript before running.
Run it with the CLI (recommended), or execute within your own Node app using CraftContext.