xmr-remote-nodes/internal/handler/views/embed.go

21 lines
343 B
Go
Raw Normal View History

2024-10-29 13:41:22 +00:00
package views
import (
"embed"
"net/http"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"
)
//go:embed assets/*
var embedStatic embed.FS
func EmbedAssets() fiber.Handler {
return filesystem.New(filesystem.Config{
Root: http.FS(embedStatic),
PathPrefix: "assets",
Browse: false,
})
}