Getting Started
Start building with Bklar in seconds.
Getting Started
Bklar is designed to be up and running instantly. The best way to start a new project is using our official CLI tool.
Automatic Installation
We recommend using bun create to scaffold your project. It provides interactive templates for different use cases.
Choose a Template
The interactive wizard will ask you to choose a template:
- Minimal: A single file setup. Great for microservices.
- Modular: A structured setup with folders for routes and controllers.
- Custom: Select specific plugins (CORS, JWT, Swagger, etc.) manually.
Start Development
Navigate to your new project and start the server:
cd my-app
bun run devYour server will be listening at http://localhost:3000.
Manual Installation
If you prefer to build from scratch, you can install the core package manually.
bun add bklar zodnpm install bklar zodpnpm add bklar zodNote: zod is a required peer dependency for validation.
Hello World
Create an index.ts file:
import { Bklar } from "bklar";
const app = Bklar();
app.get("/", (ctx) => {
return ctx.text("Hello from Bklar! 🐰");
});
app.listen(3000);