Skip to content

Overview & Quick Start

Payload CMS Readiness Probe

@nexload-sdk/healthcheck-payload

v2.1.0 Stable Released

Payload CMS health checks for @nexload-sdk/healthcheck.

Payload CMSNode.js

@nexload-sdk/healthcheck-payload connects @nexload-sdk/healthcheck to Payload CMS 3 instance state, verifying database connectivity, adapter health, and collection availability.


import { createHealthManager } from "@nexload-sdk/healthcheck";
import { payloadReadinessCheck } from "@nexload-sdk/healthcheck-payload";
import config from "@payload-config";
import { getPayload } from "payload";
const payload = await getPayload({ config });
export const health = createHealthManager({
service: { name: "payload-cms" },
checks: [
payloadReadinessCheck(payload, {
collection: "users",
expectedMinDocuments: 1,
}),
],
});

  • Database Connectivity Verification: Executes lightweight count queries via Payload Local API to confirm database accessibility.
  • Boot Readiness Check: Guarantees that Payload has finished compiling collections, globals, and plugins before Kubernetes directs traffic.
  • Zero Raw SQL/Mongo Dependency: Interacts solely through the authoritative Payload Local API.

Terminal window
pnpm add @nexload-sdk/healthcheck-payload @nexload-sdk/healthcheck payload

Requires Payload CMS >=3.85.0 <4.0.0 and Node.js >=20.9.0.