oak

Oak

Specific best practices and architectural patterns when working with Oak.

Details

Language / Topic
denoDeno
Category
framework

Rules

balanced
- In Deno projects: Leverage `ctx.state` across middleware consistently to track custom request state, specific connections, and auth tokens safely.
- Construct explicit HTTP boundaries by handling specific statuses gracefully using standard `ctx.throw(404)`.
- In Deno projects: Group related controllers coherently using decoupled nested Routers accurately scoping specific path prefixes cleanly.
- Explicitly invoke `await next()` logically inside robust async middleware accurately to strictly manage downstream request lifecycles.