web

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

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.

Handler is not yet mounted by main.go: this package is compiled and tested, but not served, until the increment that adds the local server (spec/features/local-server-and-web-console).

Index

Constants

This section is empty.

Variables

View Source
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.

Functions

func Built

func Built() bool

Built reports whether a real console build is embedded.

func Handler

func Handler() http.Handler

Handler serves the embedded console at "/" and the embedded TODO app at "/apps/todo/", matching the Vite multi-page build's output layout and spec/features/local-server-and-web-console#REQ:route-layout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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