1.1.0 • Published 7 years ago

admin-plugin-healthcheck v1.1.0

Weekly downloads
59
License
MIT
Repository
github
Last release
7 years ago

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 (v > 0.8) {
            throw new Error('Random value >0.8');
          } else if (v > 0.3) {
            return "Healthy like an application that isn't used.";
          } else {
            return Promise.reject('Something bad happened here…');
          }
        }
      }
    })
  ]
});
1.1.0

7 years ago

1.0.0

7 years ago