0.0.1 • Published 4 years ago

moleculer-healthcheck-mongo-middleware v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

moleculer-mongo-checker

This project provides health checkers for moleculer-healthcheck-middleware for projects using moleculer-db-adapter-mongo.

Usage

This project gives createChecker functions to use with moleculer-healthcheck-middleware.

Initialize the Mongo Liveness check

const HealthMiddleware = require('@r2d2bzh/moleculer-healthcheck-middleware');
const MongoHealthcheck = require('@r2d2bzh/moleculer-mongo-healthcheck');

const broker = new ServiceBroker({
  middlewares: [
    middlewares: [HealthMiddleware({
      liveness: {
        createChecker: MongoHealthcheck.createLivenessChecker
      }
    })],
  ],
});