Documentation
¶
Overview ¶
Package console embeds the built LadyM management console (Vue 3 + Vite, sources in this directory, build via `make console-build`) so `ladym serve --http` can serve it at "/" without node on the machine.
console/dist is committed to the repo: a plain `go build` always works. Rebuild dist only when the frontend sources change.
Mounting the embedded console on an HTTP mux. The console package is a pure asset package (no LadyM dependencies); both the personal-edition api node (api/console_mount_personal.go) and the enterprise ladymconsole binary (cmd/ladymconsole, via cli.NewConsoleCmd) mount it through here, so the serving semantics — static assets from the embed FS, SPA fallback to index.html, JSON 404 for unknown /api paths — live in exactly one place.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dist ¶
Dist returns the built console assets rooted at dist/ (index.html at the root, hashed bundles under assets/).
func Mount ¶
Mount registers the embedded console at mux's "/". It is registered without a method constraint so unknown paths (any method) reach the handler — it 404s the /api/ ones and serves the SPA for the rest. The mount is deliberately NOT behind any auth middleware: the login page itself has to load before anyone can authenticate; only /api/* is gated (by the api package's middleware).
Types ¶
This section is empty.