feat: embed the built web app in sondad behind the webui build tag

internal/webui carries web/'s build (written to internal/webui/dist by Vite, git-ignored) when sondad is built with -tags webui. Without the tag the app is absent and a plain go build and go test still work with no Node. main wires it into the router.
This commit is contained in:
tgiachi 2026-11-12 15:56:34 +01:00
commit 249b2cb7bc

View file

@ -38,6 +38,7 @@ import (
"codeberg.org/squidd/sonda/internal/streaming"
"codeberg.org/squidd/sonda/internal/taste"
"codeberg.org/squidd/sonda/internal/usersettings"
"codeberg.org/squidd/sonda/internal/webui"
"codeberg.org/squidd/sonda/migrations"
)
@ -284,6 +285,7 @@ func run() error {
About: descriptions,
Settings: userSettings,
Streams: streaming.NewService(libraryRepo),
Web: webui.FS(),
})
// No WriteTimeout: audio streaming (later) needs long responses.