Add health url
This commit is contained in:
parent
f1f5e1b712
commit
6c5c3a36c9
6
main.go
6
main.go
@ -92,6 +92,12 @@ func main() {
|
|||||||
// set webhook
|
// set webhook
|
||||||
http.HandleFunc(webhookLocalUrl, handleWebhook)
|
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
|
// listen server
|
||||||
fmt.Println("webhook server listening on " + os.Getenv("LISTEN"))
|
fmt.Println("webhook server listening on " + os.Getenv("LISTEN"))
|
||||||
fmt.Println("webhook url " + webhookUrl)
|
fmt.Println("webhook url " + webhookUrl)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user