diff --git a/main.go b/main.go index 98215cb..e57c0d7 100644 --- a/main.go +++ b/main.go @@ -193,6 +193,11 @@ func vectorHandler(w http.ResponseWriter, r *http.Request) { }) } +func healthHandler(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(map[string]string{"status": "ok"}) +} + func main() { port := os.Getenv("PORT") if port == "" { @@ -200,6 +205,7 @@ func main() { } http.HandleFunc("/vector", vectorHandler) + http.HandleFunc("/ok", healthHandler) log.Printf("Starting server on port %s...\n", port) log.Fatal(http.ListenAndServe(":"+port, nil)) }