https://github.com/softonic/hapi-softonic-load-balancing
Hapi plugin to provide health checks for a server in the Softonic infrastructure
https://github.com/softonic/hapi-softonic-load-balancing
Last synced: about 1 year ago
JSON representation
Hapi plugin to provide health checks for a server in the Softonic infrastructure
- Host: GitHub
- URL: https://github.com/softonic/hapi-softonic-load-balancing
- Owner: softonic
- License: other
- Created: 2016-11-13T12:14:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T08:08:38.000Z (over 3 years ago)
- Last Synced: 2024-04-14T11:16:42.201Z (about 2 years ago)
- Language: JavaScript
- Size: 107 KB
- Stars: 0
- Watchers: 21
- Forks: 2
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```bash
npm install hapi-softonic-load-balancing
```
## Usage
```javascript
// 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:
```bash
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`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D