Examples Index
Docs Home | Previous: createApp Config Reference | Next: Production Checklist
Runnable examples are under the repository examples/ directory. They are numbered in order of increasing complexity.
| Example | Focus |
|---|---|
| 01_hello-world | Minimal single-route server |
| 02_crud | CRUD endpoints, DTOs, exceptions, Swagger UI, error formatter |
| 03_multi-controller | Multiple controllers and metadata decorators |
| 04_dependency-injection | Providers, token injection, and service decorators |
| 05_modules | Module imports/exports and visibility |
| 06_guards | Guards, security guard mapping, role checks, @Security decorator |
| 07_interceptors | Response transformation and short-circuiting |
| 08_logging | AsyncLocalStorage request context and caller tags |
| 09_complex | Multi-module composition |
| 10_mvc | Server-side rendering with @Render and Handlebars |
| 11_jwt-auth | JWT Bearer API auth with TypeORM, DataSource DI, Bun.password, and jose |
| 12_form-auth | Form-based web auth with JWT-in-cookie, DataSource DI, and Handlebars views |
| 13_typeorm-relations | TypeORM one-to-many / many-to-one relations with DataSource DI |
| 14_session-auth | Stateful server-side sessions with HttpOnly cookie, DataSource DI, and Handlebars |