Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arthurfiorette/medicus
A framework agnostic healthcheck handler
https://github.com/arthurfiorette/medicus
agnostic check fastify health http server
Last synced: 1 day ago
JSON representation
A framework agnostic healthcheck handler
- Host: GitHub
- URL: https://github.com/arthurfiorette/medicus
- Owner: arthurfiorette
- License: mit
- Created: 2024-11-11T15:36:33.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-01-10T14:18:13.000Z (2 days ago)
- Last Synced: 2025-01-10T15:29:13.699Z (1 day ago)
- Topics: agnostic, check, fastify, health, http, server
- Language: TypeScript
- Homepage: http://medicus.js.org
- Size: 796 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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
> 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**.](https://arthur.run/medicus)
```ts
import { Medicus, HealthStatus } from 'medicus';const medicus = new Medicus();
// Add health checkers
medicus.addChecker({
database() {
// Custom health logic
return HealthStatus.HEALTHY;
},
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`](LICENSE) for more information.
## Star History
## All Thanks To Our Contributors: