From 45f72a819ce9787620edb5bdff638eaa8e98ed7f Mon Sep 17 00:00:00 2001 From: Nate Meyer <672246+notnmeyer@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:32:12 -0800 Subject: [PATCH] feat: /healthcheck (#18) --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index a1f70e8..585d11b 100644 --- a/main.go +++ b/main.go @@ -22,6 +22,11 @@ func init() { } func main() { + // exempt from required headers, etc. + http.HandleFunc("/healthcheck", func(w http.ResponseWriter, t *http.Request) { + w.WriteHeader(http.StatusOK) + }) + http.HandleFunc("/", handler) listenAddr := fmt.Sprintf(":%d", c.port) fmt.Printf("Listening on %s...\n", listenAddr)