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:
parent
7acac73dd0
commit
249b2cb7bc
1 changed files with 56 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue