mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-18 13:42:02 +08:00
Add healthz endpoint (#296)
This commit is contained in:
parent
84bd4c63ed
commit
cc26be0f1d
9
handler/healthz.go
Normal file
9
handler/healthz.go
Normal file
@ -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!🥳")
|
||||||
|
}
|
@ -85,6 +85,8 @@ func main() {
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
listenAddress := config.Config.Host + ":" + config.Config.Port
|
listenAddress := config.Config.Host + ":" + config.Config.Port
|
||||||
|
|
||||||
|
app.Get("/healthz", handler.Healthz)
|
||||||
app.Get("/*", handler.Convert)
|
app.Get("/*", handler.Convert)
|
||||||
|
|
||||||
fmt.Println("WebP Server Go is Running on http://" + listenAddress)
|
fmt.Println("WebP Server Go is Running on http://" + listenAddress)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user