build: optionally embed frontend files
1 file changed, 2 insertions(+), 4 deletions(-)
changed files
M internal/server/server.go → internal/server/server.go
@@ -16,6 +16,7 @@ "slices" "strconv" "time" + "searchix/frontend" cfg "searchix/internal/config" "searchix/internal/importer" "searchix/internal/options"@@ -243,10 +244,7 @@ http.Error(w, err.Error(), http.StatusInternalServerError) } }) - mux.Handle( - "/static/", - http.StripPrefix("/static/", http.FileServer(http.Dir("frontend/static"))), - ) + mux.Handle("/static/", http.FileServer(http.FS(frontend.Files))) if runtimeConfig.LiveReload { applyDevModeOverrides(config)