trifid-core
Version:
Trifid Core
26 lines (25 loc) • 587 B
JavaScript
/**
* Health route handler.
*
* @param request Request.
* @param reply Reply.
*/
const healthRouteHandler = async (request, reply) => {
request.log.debug('reached health endpoint');
reply.type('text/plain').send('OK\n');
return reply;
};
const factory = async (_trifid) => {
return {
defaultConfiguration: async () => {
return {
paths: ['/healthz'],
methods: ['GET'],
};
},
routeHandler: async () => {
return healthRouteHandler;
},
};
};
export default factory;