From 4b83d3b2fc146dae4e5726ed50b391c511ddb9f3 Mon Sep 17 00:00:00 2001 From: Chris Hua Date: Fri, 30 Jun 2023 16:41:52 -0400 Subject: [PATCH] chore: http healthcheck --- cmd/server/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/server/main.go b/cmd/server/main.go index e6ca613..0089d3e 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -46,6 +46,8 @@ func (s *FeatureSheetServer) Evaluate( return res, nil } +func ok(_ http.ResponseWriter, _ *http.Request) {} + func main() { // copy these from client_secret.json if os.Getenv("GCP_PROJECT_ID") == "" { @@ -94,6 +96,7 @@ func main() { "featuresheet.v1.FeatureSheetService", ) mux.Handle(grpchealth.NewHandler(checker)) + mux.Handle("/health", http.HandlerFunc(ok)) portNum := os.Getenv("PORT") if portNum == "" { portNum = "8080"