Basic REST app

This commit is contained in:
2026-03-30 18:26:45 +02:00
commit 42f9b974b2
17 changed files with 309 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package fiberconfig
import (
"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/middleware/logger"
)
func Setup(app *fiber.App) {
app.Use(func(c fiber.Ctx) error {
c.Set("Content-Type", "application/json")
return c.Next()
})
app.Use(logger.New(logger.Config{
Format: "[${time}] ${status} - ${method} ${path} (${latency}) - ${ip}\n",
TimeFormat: "2006-01-02 15:04:05",
}))
}