UNPKG

@piggly/fastify-chassis

Version:

An ESM/CommonJS toolkit to help you to do common operations in your back-end applications with Fastify and NodeJS.

21 lines (20 loc) 714 B
import type { FastifyRequest, FastifyReply } from 'fastify'; import type { HealthCheckService } from '../services'; /** * Health check route. * * It will run the health check service and return the result. * If success, it will return 200. Otherwise, it will return 503. * * The response will be a JSON object with the following properties: * - [service]: boolean * * @param {Object} deps * @param {HealthCheckService} deps.HEALTH_CHECK_SERVICE * @returns Route handler. * @since 7.0.0 * @author Caique Araujo <caique@piggly.com.br> */ export declare const HealthCheckRoute: (deps: { HEALTH_CHECK_SERVICE: HealthCheckService; }) => (request: FastifyRequest, reply: FastifyReply) => Promise<any>;