Commit f85db4fe by mhmdhaekal

feat(initialize): Add logger and healthcheck in app

1 parent 260f1234
Showing with 5 additions and 0 deletions
......@@ -5,6 +5,8 @@ import (
"os"
"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/middleware/healthcheck"
"github.com/gofiber/fiber/v3/middleware/logger"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"ui.ac.id/dtd/go-webserver-boilerplate/internal/handler"
......@@ -28,6 +30,9 @@ func main() {
ErrorHandler: handler.ErrorHandler,
})
app.Use(logger.New())
app.Get("/", healthcheck.NewHealthChecker())
//api group
api := app.Group("/api")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!