web: add health and status endpoints
Signed-off-by: Nathan13888 <29968201+Nathan13888@users.noreply.github.com>
This commit is contained in:
parent
d745d9fa6a
commit
a15609caaf
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue