Getting Started
Prerequisites
curl -fsSL https://bun.sh/install | bashInstallation
bunx create-rune my-appcd my-appbun installbun run devManual Setup
mkdir my-app && cd my-appbun init -ybun add @rune/core @rune/decoratorsYour First App
1. Create a Controller
import { Controller, Get } from "@rune/decorators";
@Controller("/")export class HelloController { @Get("/") hello() { return { message: "Hello, Rune!" }; }}2. Create a Module
import { Module } from "@rune/decorators";import { HelloController } from "./controllers/hello.controller";
@Module({ controllers: [HelloController], providers: [], imports: [], exports: [],})export class AppModule {}3. Bootstrap
import { createApp } from "@rune/core";import { AppModule } from "./app.module";
const app = createApp();app.registerModule(AppModule);app.init();
Bun.serve({ port: 3000, fetch: (req) => app.fetch(req),});
console.log("Server running on http://localhost:3000");4. Run
bun src/main.ts# or with watch modebun --watch src/main.tsNext Steps
- Learn about Decorators
- Add Validation
- Generate OpenAPI docs
- Deploy with Runtime Adapters