added health endpoint
This commit is contained in:
parent
b2ce13bed2
commit
9f8c4f4135
@ -54,7 +54,12 @@ func (ws *WS) RunServer(config config.Config, templatefiles *embed.FS, staticfil
|
|||||||
ws.e.GET("/static/*", func(c echo.Context) (err error) {
|
ws.e.GET("/static/*", func(c echo.Context) (err error) {
|
||||||
return static.GetStatic(staticfiles, c)
|
return static.GetStatic(staticfiles, c)
|
||||||
})
|
})
|
||||||
|
ws.e.GET("/health", func(c echo.Context) (err error) {
|
||||||
|
return c.String(http.StatusOK, "OK")
|
||||||
|
})
|
||||||
|
ws.e.HEAD("/health", func(c echo.Context) (err error) {
|
||||||
|
return c.String(http.StatusOK, "OK")
|
||||||
|
})
|
||||||
ws.e.Logger.Fatal(ws.e.Start(fmt.Sprintf("%s:%s", config.Host, config.Port)))
|
ws.e.Logger.Fatal(ws.e.Start(fmt.Sprintf("%s:%s", config.Host, config.Port)))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user