Add health url

This commit is contained in:
Illya Marchenko 2024-04-22 17:14:09 +03:00
parent f1f5e1b712
commit 6c5c3a36c9
Signed by: stuzer05
GPG Key ID: A6ABAAA9268F9F4F

@ -92,6 +92,12 @@ func main() {
// set webhook
http.HandleFunc(webhookLocalUrl, handleWebhook)
// health
http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.Write([]byte(`{"status":"pass"}`))
})
// listen server
fmt.Println("webhook server listening on " + os.Getenv("LISTEN"))
fmt.Println("webhook url " + webhookUrl)