Add health check endpoint

This commit is contained in:
skidoodle 2024-09-29 17:11:27 +02:00
parent 58c3b13d04
commit ef0978447f
Signed by: albert
GPG key ID: A06E3070D7D55BF2
2 changed files with 12 additions and 0 deletions

11
health.go Normal file
View file

@ -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"))
})
}

View file

@ -3,5 +3,6 @@ package main
func main() {
initDatabases()
go startUpdater()
healthCheck()
startServer()
}