Install Semola
Install Semola using your preferred package manager:
Semola requires Bun 1.1+ as the runtime. Install Bun from bun.sh
Install a validation library
Semola uses Standard Schema for validation. Install Zod (recommended) or your preferred validator:Other supported validators: Valibot, ArkType, or any Standard Schema v1 compatible library.
Create your first API
Create a new file Run your server:Test it:
server.ts and build a type-safe REST API:server.ts
Expected Response
Expected Response
Handle errors gracefully
Use Semola’s result-based error handling:
No try-catch blocks needed! The
[error, data] tuple pattern makes error handling explicit and composable.Next Steps
Now that you have a working API, explore more features:API Reference
Explore all API framework features
Building APIs
Learn advanced API patterns
Background Jobs
Process tasks with Redis queues
Error Handling
Master result-based error patterns