Initial commit

This commit is contained in:
tajniak81
2026-07-06 08:50:52 +02:00
commit ba3f227361
153 changed files with 18116 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
package api
import (
"embed"
"io/fs"
"net/http"
)
// The DriverVault API panel: a Vue 3 + Tailwind app (source in panel/, built with
// `npm run build` into internal/api/dist) embedded at compile time and served
// at the server root. It shows a live health status and the REST reference.
//
//go:embed all:dist
var panelFS embed.FS
// panelHandler serves the built panel assets from the embedded dist directory.
func panelHandler() http.Handler {
sub, err := fs.Sub(panelFS, "dist")
if err != nil {
panic(err) // embedded dist is malformed; unreachable in a valid build
}
return http.FileServerFS(sub)
}