add health check api

This commit is contained in:
MaysWind
2022-12-05 22:59:26 +08:00
parent fd7905833e
commit 6f88e6ef26
4 changed files with 35 additions and 1 deletions
+2
View File
@@ -131,6 +131,8 @@ func startWebServer(c *cli.Context) error {
router.StaticFile("/desktop/touchicon.png", filepath.Join(config.StaticRootPath, "touchicon.png"))
router.StaticFile("/desktop/manifest.json", filepath.Join(config.StaticRootPath, "manifest.json"))
router.GET("/healthz.json", bindApi(api.Healths.HealthStatusHandler))
apiRoute := router.Group("/api")
apiRoute.Use(bindMiddleware(middlewares.RequestId(config)))