Platform 11–13 · Study guide
Group HTTP middleware, expose health probes, and hook boot/request/shutdown events.
Use the Application kernel so middleware, health, and lifecycle register together:
app = Application(".").with_framework_providers().create()
MiddlewareManager lets you name stacks (for example web, api, auth) and attach them to routes. Keep cross-cutting concerns (logging, auth headers, CORS wrappers) out of every controller.
| Endpoint | Meaning |
|---|---|
GET /health | Process alive |
GET /health/ready | Dependencies ready (when checks are registered) |
boot — app startingshutdown — app stoppingbefore / after — around a requestexception — centralized error observationUse hooks for metrics, audit logs, or cleanup — not for primary business rules (those stay in services).