Skip to content

Commit

Permalink
Add healthz endpoint (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
n0vad3v authored Nov 23, 2023
1 parent 84bd4c6 commit cc26be0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions handler/healthz.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package handler

import (
"github.com/gofiber/fiber/v2"
)

func Healthz(c *fiber.Ctx) error {
return c.SendString("WebP Server Go up and running!🥳")
}
2 changes: 2 additions & 0 deletions webp-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ func main() {
}))

listenAddress := config.Config.Host + ":" + config.Config.Port

app.Get("/healthz", handler.Healthz)
app.Get("/*", handler.Convert)

fmt.Println("WebP Server Go is Running on http://" + listenAddress)
Expand Down

0 comments on commit cc26be0

Please sign in to comment.