2021-07-09 12:13:19 +00:00
|
|
|
package routes
|
|
|
|
|
|
|
|
import (
|
2021-08-03 18:14:32 +00:00
|
|
|
"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-17 15:06:43 +00:00
|
|
|
|
2021-07-09 12:13:19 +00:00
|
|
|
return app
|
|
|
|
}
|