package routes import ( "path" "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/logger" "github.com/gofiber/fiber/v2/middleware/recover" ) const FrontendOutDir = "./out/frontend" func (s *Service) Root(r fiber.Router) { r.Use(logger.New()) r.Use(recover.New()) r.Static("/", FrontendOutDir) for _, entrypoint := range HtmlEntrypoints { r.Get(entrypoint.Route, func(c *fiber.Ctx) error { return c.SendFile(path.Join(FrontendOutDir, entrypoint.Filename)) }) } }