Skip to content

Commit

Permalink
chore: http healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
stillmatic committed Jun 30, 2023
1 parent 33d4984 commit 4b83d3b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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") == "" {
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 4b83d3b

Please sign in to comment.