console

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package console embeds the built web console SPA (spec §9) and serves it on the admin port: adminapi/console.go mounts Handler behind http.StripPrefix("/id/merlon/console", …). The UI itself lives in console/ui (Svelte 5 + Vite — docs/dev/style.md, "Console"); this package carries only the embed and the static-file server.

dist/ is a committed build artifact maintained by console/build.sh; the Go build never invokes node. console_test.go smoke-tests the embedded bundle (asset round-trips against dist/, no path escapes below it), so a console/ui rebuild and a console/dist refresh move together in one commit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler() http.Handler

Handler returns an http.Handler serving the embedded dist as a file server rooted at "/": callers mount it under a prefix and strip that prefix first (adminapi/console.go). Paths with no file behind them fall back to index.html, so any subpath URL serves the app; console routing is hash-based (console/ui/src/lib/routes.js) and App.svelte redirects unknown hashes to the default route. Panics if the embedded dist is absent — go:embed already fails the build on that, so the panic is a tripwire, not an expected path.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL