mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-03 08:50:13 +02:00
add HEALTHCHECK.
This commit is contained in:
parent
14939db65a
commit
ed2cdaf71d
3 changed files with 8 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue