Avi.js tutorial
This tutorial teaches Avi.js by building a small API, one concept per chapter. It is written for Node.js and TypeScript developers who know Express. NestJS experience helps but is not required.
Every chapter runs with the published packages. Start with chapter 0 to create a project, then follow the chapters in order or jump to what you need.
| # | Chapter | Status |
|---|---|---|
| 0 | Getting started | Runnable |
| 1 | Your first app | Runnable |
| 2 | Routing: params, query, precedence | Runnable |
| 3 | Modules and dependency injection | Runnable |
| 4 | Controllers: explicit and decorator styles | Runnable |
| 5 | Middleware, guards and errors | Runnable |
| 6 | Validation and typed input | Runnable |
| 7 | Running in production | Runnable |
| 8 | Testing your app | Runnable |
| 9 | Project structure: modular and minimal | Runnable |
| 10 | Build-time checks and manifests | Runnable |
| 11 | OpenAPI documents | Runnable |
| 12 | Security headers and CORS | Runnable |
| 13 | Avi.js for NestJS developers | Runnable |
Throughout the tutorial you build Greeter, a small API with a users resource and a greeting service, so each chapter adds to the previous one.