Add basic healthcheck route

This commit is contained in:
2021-02-01 15:27:13 +01:00
parent e016c6714d
commit ee4c68cfba

View File

@ -24,6 +24,11 @@ func main() {
fmt.Fprintf(w, "OK")
})
http.HandleFunc("/healthcheck", func(w http.ResponseWriter, r *http.Request) {
// TODO: if the last scan errored, this should not return OK
fmt.Fprintf(w, "OK")
})
fs := http.FileServer(http.Dir("static/"))
http.Handle("/static/", http.StripPrefix("/static/", fs))