first commit

This commit is contained in:
MengMengCode
2026-06-05 19:23:28 +08:00
commit e306d2d06b
66 changed files with 18825 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
package server
import (
"embed"
"io/fs"
"net/http"
)
//go:embed web/**
var embeddedWeb embed.FS
// GetEmbeddedFS returns the embedded frontend file system
func GetEmbeddedFS() http.FileSystem {
sub, err := fs.Sub(embeddedWeb, "web")
if err != nil {
return http.Dir("web")
}
return http.FS(sub)
}