From 73c30697527585d6ff8e464c6e995435d7fb074e Mon Sep 17 00:00:00 2001 From: Jake Hobbs Date: Thu, 18 Jan 2024 22:47:20 -0800 Subject: [PATCH] add health check --- service/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service/main.go b/service/main.go index 6ebf6d4..72e3c94 100644 --- a/service/main.go +++ b/service/main.go @@ -40,6 +40,10 @@ func main() { db = getDb() defer db.Close() + r.Get("/healthz", func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + }) + r.Route("/message", func(r chi.Router) { r.Post("/create", createMessageHandler) })