strapi-health-plugin
Version:
A Strapi plugin for supporting Kubernetes health checks
28 lines (27 loc) • 652 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
config: {
enabled: true,
auth: false,
},
routes: [
{
method: 'ALL',
path: '/',
handler: [
(ctx) => {
const healthcheck = {
uptime: process.uptime(),
message: 'OK',
timestamp: Date.now(),
};
ctx.body = healthcheck;
},
],
config: {
auth: false,
},
},
],
};