web

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package web embeds the built frontend (the Vue SPA) into the Go binary so a single `miabi` executable serves both the API and the UI — no separate static files to ship or MIABI_WEB_DIR to configure.

The `dist/` directory is a build artifact: `make build-ui` runs the Vue build and copies its output here, then `go build` bakes it in. Only a placeholder (.gitkeep) is committed, so `go build`/`go test` always compile even when the UI has not been built; in that case the embedded FS is empty and the server serves the API with the UI routes 404-ing. Real release/Docker builds always build the UI first, so shipped binaries are self-contained.

Index

Constants

This section is empty.

Variables

View Source
var Assets embed.FS

Assets holds the built SPA under a top-level "dist/" directory. Served via Okapi's WebFS with WebConfig{Root: "dist"}. The `all:` prefix ensures dotted files (e.g. the .gitkeep placeholder, Vite's occasional dotfiles) are included.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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