Add healthchecks (#437)

This commit is contained in:
Jonas Plum
2025-08-22 10:53:55 +02:00
committed by GitHub
parent 1e22c78c22
commit f9451d73bf
3 changed files with 35 additions and 7 deletions

View File

@@ -990,6 +990,10 @@ func onBootstrapHandler() func(se *core.BootstrapEvent) error {
}
func registerRoutes(se *core.ServeEvent, client meilisearch.ServiceManager) {
se.Router.GET("/health", func(e *core.RequestEvent) error {
return e.JSON(http.StatusOK, map[string]string{"status": "ok"})
})
se.Router.GET("/public/search/token", func(e *core.RequestEvent) error {
searchRules := map[string]interface{}{
"lists": map[string]string{