@lokalise/fastify-extras
Version:
Opinionated set of fastify plugins, commonly used in Lokalise
12 lines • 347 B
JavaScript
/**
* Return a function which executes healthcheck and throws an error if it fails
*/
export const wrapHealthCheck = (app, healthCheck) => {
return async () => {
const response = await healthCheck(app);
if (response.error) {
throw response.error;
}
};
};
//# sourceMappingURL=healthcheckCommons.js.map