Expand description
HTTP surface for codetopo (Phase 2 design §3, §4).
Re-exports§
Modules§
- auth
- Bearer-key authentication and per-request metering (Phase 2 design §4, §5).
- config
- Runtime configuration, all of it from the environment.
- error
- JSON error type shared by every handler and middleware.
- handlers
- The eight request handlers of the Phase 2 API (design §3).
- keys
- API keys loaded from a newline-delimited
key_id:secretfile. - metering
- Append-only metering log (Phase 2 design §5).
Functions§
- app
- Builds the served application: routes, then auth + metering around them.