Documentation
¶
Overview ¶
Package ui embeds the pre-built React frontend and exposes it as an fs.FS so the server can serve it from the same origin as the API (eliminating all CORS configuration for self-hosted deployments).
Development workflow (no embedding needed) ¶
Run the Vite dev server separately:
cd frontend && npm run dev
Vite proxies /api → localhost:8080 automatically (see vite.config.ts). The backend serves only the API; the browser fetches everything from Vite.
Production / Docker workflow ¶
The multi-stage Dockerfile builds the frontend first, copies the output into this directory, then compiles the Go binary. The embed directive captures whatever is in dist/ at compile time.
If dist/ contains only .gitkeep (i.e. no real frontend build), FS() returns nil and the router skips static serving — the API still works.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.