added http logger

This commit is contained in:
Timo Volkmann 2021-01-11 00:00:00 +01:00
parent 0cdaafcc44
commit 481f62fb6c

View File

@ -4,6 +4,7 @@ import (
"errors"
"git.timovolkmann.de/gyrogpsc/core"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/logger"
"github.com/gofiber/template/html"
"github.com/gofiber/websocket/v2"
"github.com/google/uuid"
@ -14,7 +15,8 @@ func CreateServer(s *core.TrackingService, sub core.Subscriber, c *core.Configur
app := fiber.New(fiber.Config{
Views: fiberTemplateEngine(c),
})
app.Static("/static", "static")
app.Use(logger.New())
app.Static("/static", "./static")
// Application Main Page
app.Get("/", fiberHomeHandler)