medicus
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

Using this package? Please consider donating to support my open source work ❤️
Help medicus grow! Star and share this amazing repository with your friends and co-workers!


Medicus logo


License Codecov Downloads Bundlephobia Last commit



Medicus

Flexible and agnostic health checks. Ensure the post-deployment health of your services.


Medicus is a comprehensive, agnostic health check library for Node.js. It provides an easy way to monitor the health of various services and integrates seamlessly with Fastify.


Read the docs to Learn More.



import { Medicus, HealthStatus } from 'medicus';

const medicus = new Medicus();

// Add health checkers
medicus.addChecker({
  database() {
    // Custom health logic
    return HealthStatus.HEALTHY;
  },
  async cache() {
    // Simulate an unhealthy status
    return HealthStatus.UNHEALTHY;
  }
});

// Perform a health check
const result = await medicus.performCheck(true);
// {
//   status: 'UNHEALTHY',
//   services: {
//     database: { status: 'HEALTHY' },
//     cache: { status: 'UNHEALTHY' }
//   }
// }

License

Licensed under the MIT. See LICENSE for more information.


Star History

Star History Chart

All Thanks To Our Contributors:


Readme

Keywords

none

Package Sidebar

Install

npm i medicus

Weekly Downloads

274

Version

0.4.0

License

MIT

Unpacked Size

162 kB

Total Files

60

Last publish

Collaborators

  • hazork