Add basic healthcheck route
This commit is contained in:
@ -24,6 +24,11 @@ func main() {
|
|||||||
fmt.Fprintf(w, "OK")
|
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/"))
|
fs := http.FileServer(http.Dir("static/"))
|
||||||
http.Handle("/static/", http.StripPrefix("/static/", fs))
|
http.Handle("/static/", http.StripPrefix("/static/", fs))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user