aboutsummaryrefslogtreecommitdiffhomepage
path: root/service
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-12-28 13:41:26 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-12-28 13:41:26 -0800
commita9fad093e6383c21a45de069795a77f2cab9c318 (patch)
treee8eb4cb2918ebdcea5a0236db2d689ab713a8511 /service
parent56efd2eb3f554b590fad8bebc4a1d752b66e5363 (diff)
Move healthcheck endpoint from ui package to httpd service
Diffstat (limited to 'service')
-rw-r--r--service/httpd/httpd.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/service/httpd/httpd.go b/service/httpd/httpd.go
index 612418d..2e93086 100644
--- a/service/httpd/httpd.go
+++ b/service/httpd/httpd.go
@@ -169,5 +169,9 @@ func setupHandler(cfg *config.Config, store *storage.Storage, feedHandler *feed.
api.Serve(router, store, feedHandler)
ui.Serve(router, cfg, store, pool, feedHandler)
+ router.HandleFunc("/healthcheck", func(w http.ResponseWriter, r *http.Request) {
+ w.Write([]byte("OK"))
+ }).Name("healthcheck")
+
return router
}