Skip to content

Commit

Permalink
Add /api/healthz endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
svilenmarkov committed Sep 29, 2024
1 parent b0c4d70 commit 9a36187
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/glance/glance.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ func (a *Application) Serve() error {

mux.HandleFunc("GET /api/pages/{page}/content/{$}", a.HandlePageContentRequest)
mux.HandleFunc("/api/widgets/{widget}/{path...}", a.HandleWidgetRequest)
mux.HandleFunc("GET /api/healthz", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusOK)
})

mux.Handle(
fmt.Sprintf("GET /static/%s/{path...}", a.Config.Server.AssetsHash),
Expand Down

0 comments on commit 9a36187

Please sign in to comment.