Documentation
¶
Overview ¶
Package web embeds the Vue console and TODO app that `pnpm -C web build` produces, so a released ovdb binary serves them with no Node runtime and no separate asset directory to ship alongside it.
dist/ is git-ignored except for dist/.gitkeep, which exists only because the go:embed directive below refuses a directory that is not there, so it needs something to embed in a clean clone. dist/.gitkeep is not committed directly: it is copied there from the tracked public/.gitkeep by every `vite build`, because Vite empties dist/ before each build and would otherwise delete a placeholder committed straight into it — the same technique wb's Astro build uses for hub/web/dist/.gitkeep. Handler then serves the friendly not-built page instead of the console. This is S3 of spec/features/configuration-parity #REQ:increment-zero-spikes, implementing spec/features/local-server-and-web-console#REQ:embedded-assets. Modeled on sneat-dev/wb's hub/web/embed.go, the reference implementation this pattern was proven against.
internal/localserver mounts Handler for signed-in browsers; everyone else gets its landing page.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Dist embed.FS
Dist holds every file the Vite build emitted, or only .gitkeep in a clone where `pnpm -C web build` has never run.
var TokensCSS []byte
TokensCSS is the design token stylesheet (colours for light and dark) the console is built from. The Go-rendered landing and sign-in pages serve it too, so both look like one product without a second copy of the tokens.