diff --git a/health.go b/health.go new file mode 100644 index 0000000..6356226 --- /dev/null +++ b/health.go @@ -0,0 +1,11 @@ +package main + +import ( + "net/http" +) + +func healthCheck() { + http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte("Healthy")) + }) +} diff --git a/main.go b/main.go index 40698e4..b2d0b18 100644 --- a/main.go +++ b/main.go @@ -3,5 +3,6 @@ package main func main() { initDatabases() go startUpdater() + healthCheck() startServer() }