Skip to content

Commit

Permalink
add simple health endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed May 5, 2021
1 parent d87c5f6 commit 6048b75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 6048b75

Please sign in to comment.