Skip to content

Commit 8108738

Browse files
committed
feat: /healthz
1 parent 3ebc746 commit 8108738

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ func providersHandler(w http.ResponseWriter, r *http.Request) {
2525

2626
func main() {
2727
http.HandleFunc("/providers", providersHandler)
28+
http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
29+
_, _ = w.Write([]byte("OK"))
30+
w.WriteHeader(http.StatusOK)
31+
})
2832

2933
log.Println("Server starting on :8080")
3034
if err := http.ListenAndServe(":8080", nil); err != nil {
3135
log.Fatal("Server failed to start:", err)
3236
}
3337
}
34-

0 commit comments

Comments
 (0)