Merge pull request #283 from adnanh/healthcheck-route

Add `/` route handler to return 200 OK which can be used as a healthcheck endpoint
This commit is contained in:
Adnan Hajdarević
2018-11-17 19:03:20 +01:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -185,6 +185,10 @@ func main() {
hooksURL = "/" + *hooksURLPrefix + "/{id}"
}
router.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
fmt.Fprintf(w, "OK")
})
router.HandleFunc(hooksURL, hookHandler)
n.UseHandler(router)