UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature toggles service. It provides different strategies for handling feature toggles.

37 lines 1.5 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.HealthCheckController = void 0; const controller_1 = __importDefault(require("./controller")); const permissions_1 = require("../types/permissions"); const create_response_schema_1 = require("../openapi/util/create-response-schema"); class HealthCheckController extends controller_1.default { constructor(config, { openApiService }) { super(config); this.logger = config.getLogger('health-check.js'); this.openApiService = openApiService; this.route({ method: 'get', path: '', handler: this.getHealth, permission: permissions_1.NONE, middleware: [ openApiService.validPath({ tags: ['Operational'], operationId: 'getHealth', responses: { 200: (0, create_response_schema_1.createResponseSchema)('healthCheckSchema'), 500: (0, create_response_schema_1.createResponseSchema)('healthCheckSchema'), }, }), ], }); } async getHealth(_, res) { res.status(200).json({ health: 'GOOD' }); } } exports.HealthCheckController = HealthCheckController; //# sourceMappingURL=health-check.js.map