blasphem/pkg/frontend/frontend.go
2022-09-30 14:37:40 -04:00

24 lines
324 B
Go

package frontend
import (
"embed"
"io/fs"
"net/http"
)
//go:embed frontend/hass_frontend
var root embed.FS
var RootFS fs.FS
var FSHandler http.Handler
func init() {
var err error
RootFS, err = fs.Sub(root, "frontend/hass_frontend")
if err != nil {
panic(err)
}
FSHandler = http.FileServer(http.FS(RootFS))
}