add simple health endpoint

This commit is contained in:
louis 2021-05-05 21:01:47 +02:00
parent d87c5f6000
commit 6048b75b4c

View file

@ -219,6 +219,9 @@ func main() {
flag.Parse()
http.Handle("/metrics", handler{sourceURL: *videoBridgeURL})
http.HandleFunc("/health", func(w http.ResponseWriter, req *http.Request) {
_, _ = w.Write([]byte(`ok`))
})
if err := http.ListenAndServe(*addr, nil); err != nil {
log.Fatal(err)
}