Expand description
The library-resident Rocket composition root.
server assembles the per-capability route groups (management, corpora, jobs, …), the
shared fairings, and the managed state (config-file path, database URL, and connection pool)
into a testable app that the binary and the integration tests both build. Route handlers live in
their capability modules; this file only wires them together. As later arms land, their routes
are mounted here too (the binary’s legacy routes migrate in incrementally).
Functions§
- mount_
api - Mounts the full library API/UI surface from the runtime configuration. The composition root the binary uses.
- mount_
api_ with - Like
mount_api, but with an explicit config-file path and database URL (tests target the test database and a temporary config file). Builds the connection pool and manages it alongside the URL, so background jobs open their own connection against the same database.