add /uptime to return "OK" for monitoring

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-09-09 10:25:03 -05:00
parent 8d12780c4e
commit fa6dce4c56
2 changed files with 7 additions and 0 deletions

View File

@ -96,6 +96,11 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
writeFile(w, "skeleton.v2.css")
return
}
// used for uptime monitor checking
if tmp == "/uptime" {
fmt.Fprintln(w, "OK")
return
}
log.Warn("BAD URL =", url, "REPO URL =", repourl)
badurl(w, r.URL.String())
// fmt.Fprintln(w, "BAD", tmp)

View File

@ -57,3 +57,5 @@ go.wit.com/dev/alexflint/scalar git.wit.org/jcarr/go-scalar
go.wit.com/dev/andlabs/ui git.wit.org/interesting/andlabs-ui attempts to add RiscV support
go.wit.com/dev/andlabs/libui git.wit.org/interesting/libui
go.wit.com/dev/davecgh/spew git.wit.org/jcarr/go-spew
go.wit.com/dev/test/gogit2 git.wit.org/jcarr/gogit2