initial commit. Cloned timetracker repository

This commit is contained in:
Daniel Goc
2026-03-10 09:02:57 +01:00
commit f2952bcef0
189 changed files with 21334 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package public
import (
"git.ma-al.com/goc_marek/timetracker/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")
})
}