Add /api/healthz endpoint

This commit is contained in:
Svilen Markov 2024-09-29 23:56:53 +01:00
parent b0c4d70628
commit 9a36187333

View File

@ -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),