mirror of
https://github.com/m1k1o/neko.git
synced 2026-11-03 08:21:50 -06:00
add HEALTHCHECK.
This commit is contained in:
@@ -34,6 +34,10 @@ func New(conf *config.Server, webSocketHandler types.WebSocketHandler) *Server {
|
||||
webSocketHandler.Upgrade(w, r)
|
||||
})
|
||||
|
||||
router.Get("/health", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte("true"))
|
||||
})
|
||||
|
||||
fs := http.FileServer(http.Dir(conf.Static))
|
||||
router.Get("/*", func(w http.ResponseWriter, r *http.Request) {
|
||||
if _, err := os.Stat(conf.Static + r.URL.Path); !os.IsNotExist(err) {
|
||||
|
||||
Reference in New Issue
Block a user