Serves the built frontend, as its static files and, for every client-side
route, index.html with its placeholders filled. main.ts installs it after
the routers.
f
routeStaticFilesFrom(staticPaths: string[]): () => Promise<void>
context: Context<Record<string, object>>,
next: Next
Returns the middleware that serves a static file from the first of
staticPaths that has it, and index.html of the first for any other path.
Hashed build output is cached for a year, and a missing chunk is a 404.
main.ts passes dist/ then public/.
Usage
import * as mod from "api/lib/static.ts";