Skip to main content

with_frontend

Function with_frontend 

Source
pub(super) fn with_frontend(
    router: Router<AppState>,
    dir: &Path,
) -> Router<AppState>
Expand description

Serve the built frontend in dir for every path no route claims, / included. Unauthenticated, like the CEF host’s static server: the bundle holds no secrets, and srv’s key still guards every API route. Unknown paths get index.html. Full router only; the LAN router never serves it.