Neanderthal Pudding Mix
Join us to discuss the challenges, solutions and best practices for in-house JavaScript code sharing. Tuesday, 12/17 at 10am PT/1pm ET.Sign up here »

admin-plugin-healthcheck

1.1.0 • Public • Published

admin-plugin-healthcheck   Node.js admin plugin system js-semistandard-style

Contents

Installation

npm install --save admin-plugin-healthcheck

Usage

admin.configure({
  plugins: [
    require('admin-plugin-healthcheck')({
      checks: {
        random() {
          const v = Math.random();
          if (> 0.8) {
            throw new Error('Random value >0.8');
          } else if (> 0.3) {
            return "Healthy like an application that isn't used.";
          } else {
            return Promise.reject('Something bad happened here…');
          }
        }
      }
    })
  ]
});

Install

npm i admin-plugin-healthcheck

DownloadsWeekly Downloads

225

Version

1.1.0

License

MIT

Last publish

Collaborators

  • avatar