xmr-remote-nodes/frontend/embed.go

22 lines
289 B
Go
Raw Normal View History

package frontend
import (
"embed"
"io/fs"
"log"
"net/http"
)
//go:generate npm ci
//go:generate npm run build
2024-05-23 22:48:45 +00:00
//go:embed build/*
var f embed.FS
func SvelteKitHandler() http.FileSystem {
build, err := fs.Sub(f, "build")
if err != nil {
log.Fatal(err)
}
return http.FS(build)
}