Skip to content

Commit 2121536

Browse files
committed
Add health check endpoint
1 parent 698bc73 commit 2121536

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd/server/main.go

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ func main() {
3131
mux.HandleFunc("/login", srv.OAuthRedirect)
3232
mux.HandleFunc("/oauthCallback", srv.OAuthCallback)
3333
mux.HandleFunc("/logout", srv.Logout)
34+
// A health check endpoint, just returns 200 OK if the web server is responding
35+
mux.HandleFunc("/health", func(http.ResponseWriter, *http.Request) {})
3436
// Static files, from the "static/" dir
3537
mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
3638

0 commit comments

Comments
 (0)