jokes-bapak2/api/app/v1/routes/health.go

17 lines
321 B
Go
Raw Normal View History

2021-07-09 12:13:19 +00:00
package routes
import (
"jokes-bapak2-api/app/v1/handler/health"
2021-08-04 09:03:53 +00:00
"time"
2021-07-14 18:17:01 +00:00
2021-07-09 12:13:19 +00:00
"github.com/gofiber/fiber/v2"
2021-08-04 09:03:53 +00:00
"github.com/gofiber/fiber/v2/middleware/cache"
2021-07-09 12:13:19 +00:00
)
func Health(app *fiber.App) *fiber.App {
// Health check
2021-08-04 09:03:53 +00:00
app.Get("/health", cache.New(cache.Config{Expiration: 30 * time.Minute}), health.Health)
2021-07-09 12:13:19 +00:00
return app
}