Documentation
¶
Overview ¶
Package web embeds the built frontend via embed.FS, keeping the control plane a single static binary with no Node runtime required on the server, and serves it with client-side-routing fallback, so a hard refresh or direct link to a TanStack Router path like /apps/foo resolves correctly instead of 404ing at the server before React Router ever gets a chance to handle it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DistFS embed.FS
DistFS is intentionally empty (Go's embed.FS zero value, no //go:embed directive) in the default build. web/dist is a gitignored build artifact that doesn't exist until `npm run build` runs; a bare //go:embed dist here would make plain `go build ./...` fail on any checkout that hasn't built the frontend yet, breaking it repo-wide, including every quick sanity `go build`/`go vet`/`golangci-lint run` both this project's git hooks and CI already rely on. The real frontend is embedded only by an explicit `-tags embedweb` build, after `cd web && npm run build`; see embed_real.go and Handler's doc comment for what happens when it isn't.
Functions ¶
func Handler ¶
Handler serves the embedded frontend. If this binary wasn't built with -tags embedweb (the default, see embed_stub.go), it serves a 501 with an actionable message instead of panicking or 404ing silently: a missing frontend is a build configuration fact worth surfacing clearly, not a routing failure to debug.
Types ¶
This section is empty.