Files
b2b/app/delivery/web/general/bo.go
2026-03-11 14:17:26 +01:00

27 lines
559 B
Go

package general
import (
"git.ma-al.com/goc_daniel/b2b/assets"
"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/middleware/static"
)
func InitBo(app *fiber.App) {
// static files
app.Get("/*", static.New("", static.Config{
FS: assets.FS(),
// Browse: true,
MaxAge: 60 * 60 * 24 * 30, // 30 days
}))
app.Get("/*", static.New("", static.Config{
FS: assets.FSDist(),
// Browse: true,
MaxAge: 60 * 60 * 24 * 30, // 30 days
}))
app.Get("/*", func(c fiber.Ctx) error {
return c.SendFile("./assets/public/dist/index.html")
})
}