Documentation
¶
Overview ¶
Package web embeds the Jōei admin console (浄衛 — The Purification Gate) and serves it as static assets. The console is a self-contained React single-page app: its JSX sources are compiled to a single minified app.bundle.js at build time (see internal/uibuild, run via `go generate`), and React/ReactDOM are vendored locally. No CDN and no in-browser compilation, so the console works offline. The built assets are baked into the binary via go:embed so it ships inside the distroless image with no extra files at runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsoleHandler ¶
ConsoleHandler returns an http.Handler that serves the embedded console. Mount it under the "/console/" path prefix; requests are stripped of the "/console" prefix before hitting the embedded file server, so "/console/" serves index.html and "/console/styles.css" serves the stylesheet.
func FaviconHandler ¶
FaviconHandler returns an http.Handler that serves /favicon.ico from the embedded console assets. Mount it at the exact root path "/favicon.ico" so browser auto-probes get a real icon instead of a 404 — no auth, since the icon is public. The file is read once at construction.
Types ¶
This section is empty.