web

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: AGPL-3.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Web UI

React + Vite (TypeScript) frontend for the single search bar / library / calendar / settings / onboarding wizard of the Mediarium app.

The compiled Go binary embeds this app's production build (web/dist/, via go:embed in web/embed.go) so the whole app ships as one binary/one port. web/dist/index.html in the repo is a placeholder — it exists only so go build ./... succeeds on a fresh clone without requiring Node at all. Build the real thing before you actually want to use the UI:

cd web
npm install
npm run build

Then rebuild the Go binary (go build ./... from the repo root) to pick up the new embedded files — go:embed bakes them in at compile time, so a running server or a stale binary won't see a frontend rebuild until it's recompiled.

web/dist/ (other than the tracked placeholder index.html) is gitignored — it's a build artifact, not source. Don't commit a real npm run build output over the placeholder; the Dockerfile's multi-stage build regenerates it for real images.

For local frontend-only iteration against an already-running backend:

npm run dev

Vite's dev server proxies /api to http://localhost:8080 by default (see vite.config.ts). The app itself listens on port 8264, so if you run the Go server directly (go run ./cmd/app) start Vite with API_TARGET=http://localhost:8264 npm run dev.

Documentation

Overview

Package web embeds the built frontend (dist/, produced by `npm run build` — see README.md) so the compiled Go binary serves the whole UI itself with no external file dependency (single binary, single process).

Index

Constants

View Source
const DistDir = "dist"

DistDir is the subdirectory name within DistFS that dist's own files live under (embed.FS keeps the "dist/" prefix from the pattern above).

Variables

View Source
var DistFS embed.FS

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