package api import "net/http" // handleHealth reports server readiness plus device counts. "devices" is the // number of devices connected right now; "known" also includes offline devices // whose last-known state is still cached. func (s *Server) handleHealth(w http.ResponseWriter, r *http.Request) { writeJSON(w, http.StatusOK, map[string]any{ "status": "ok", "service": "pilotvault-api", "devices": s.hub.OnlineCount(), "known": len(s.hub.Snapshot()), }) }