Documentation
¶
Overview ¶
Package web embeds the built Svelte UI (web/dist) into the graywolf binary. Phase 3 ships a placeholder index.html; Phase 6 replaces the dist/ contents with the real Svelte+Chonky build output. The embed pattern means `go build` always produces a self-contained binary regardless of whether `npm run build` has been executed — the dist directory must exist with at least a placeholder index.html.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FS ¶
FS returns an fs.FS rooted at dist/ so callers can serve files without the "dist/" path prefix.
func Handler ¶
Handler returns an http.Handler that serves the embedded UI with index.html as the default document. Unknown paths fall through to 404 rather than SPA-rewriting.
func SPAHandler ¶
SPAHandler returns an http.Handler that serves static assets from the embedded dist/ and falls back to index.html for unmatched paths. This enables client-side routing in the Svelte SPA.
Types ¶
This section is empty.