From a15609caaf07258bac85c360ee08d38eb2c68862 Mon Sep 17 00:00:00 2001 From: Nathan13888 <29968201+Nathan13888@users.noreply.github.com> Date: Tue, 23 May 2023 18:38:44 -0400 Subject: [PATCH] web: add health and status endpoints Signed-off-by: Nathan13888 <29968201+Nathan13888@users.noreply.github.com> --- web/server.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/web/server.go b/web/server.go index c2d0c42..9fc5e85 100644 --- a/web/server.go +++ b/web/server.go @@ -8,8 +8,22 @@ func StartServer() error { app.Get("/", func(c *fiber.Ctx) error { return c.SendString("Hello, World 👋!") }) + app.Get("/health", getHealth) + app.Get("/healthz", getHealth) + app.Get("/alive", getHealth) - app.Listen(":3000") + app.Get("/status", getStatus) + + app.Listen(":4200") // TODO: custom port and address return nil } + +func getHealth(c *fiber.Ctx) error { + return c.SendStatus(200) +} + +func getStatus(c *fiber.Ctx) error { + // TODO: implement + return c.SendStatus(200) +}