Expand description
Serves the static web frontend.
index.html, style.css and app.js live in this crate’s assets/
directory and are served from disk when present, so editing does not
require rebuilds. If $PHRONA_FRONTEND_DIR is unset or unreadable, or the
local assets/ folder is missing (standalone release binaries,
containers), the assets embedded at compile time via include_str! are
served instead — UI routes never 404.
Functions§
- frontend_
dir - Resolve the frontend directory.
$PHRONA_FRONTEND_DIRoverrides the compile-time default so packaged binaries can serve the assets from a stable path. - index
- Serve the SPA: known assets by path, everything else falls back to the app shell (client-side routing is not used, so this also serves “/”).