2.0.0 • Published 6 years ago

hapi-softonic-load-balancing v2.0.0

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
6 years ago

hapi-softonic-load-balancing

Hapi plugin to provide health checks for a server in the Softonic infrastructure.

The health check endpoint is /loadbalancer.html.

Installation

npm install hapi-softonic-load-balancing

Usage

// CommonJS
// const HapiSoftonicLoadBalancing = require('hapi-softonic-load-balancing');

// ES6
import Inert from 'inert';
import HapiSoftonicLoadBalancing from 'hapi-softonic-load-balancing';

// Register dependency
await server.register({
  plugin: Inert,
});

// Registration
await server.register({
  plugin: HapiSoftonicLoadBalancing
});

Testing

Clone the repository and execute:

npm test

Contribute

  1. Fork it: git clone https://github.com/softonic/hapi-softonic-load-balancing.git
  2. Create your feature branch: git checkout -b feature/my-new-feature
  3. Commit your changes: git commit -am 'Added some feature'
  4. Check the build: npm run build
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request :D