pub async fn app(
config: ServerConfig,
) -> Result<(Router, FsWriter), ServerConfigError>Expand description
Builds the HTTP application: the router that serves requests, and the writer whose background work its host must settle.
Everything this app spawns belongs to that writer — publications, and
the maintenance runner that admits the runtime’s steps alongside the
grep index’s. serve settles it itself. A host embedding the
Router on its own HTTP server must call FsWriter::shutdown after
its listener drains, or publisher tasks and writer maintenance outlive
the listener unobserved. The writer also answers what a deployment’s
shape is, so a host that needs to know whether the grep index job is
registered here asks
FsWriter::maintenance_job.