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.

Functions

f
routeStaticFilesFrom(staticPaths: string[]): (
context: Context<Record<string, object>>,
next: Next
) => Promise<void>

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/.