# health-check-api

> Get the health of api infra

Latest version **0.0.2** (published 2015-12-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install health-check-api
pnpm add health-check-api
yarn add health-check-api
bun add health-check-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-12-22 |
| First published | 2015-12-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lucas Rodrigues |
| Maintainers | lucastinik |
| Keywords | health check, redis |

## Links

- npm: https://www.npmjs.com/package/health-check-api
- Repository: https://github.com/LucasRodrigues/health-check-api
- Homepage: https://github.com/LucasRodrigues/health-check-api#readme
- Issues: https://github.com/LucasRodrigues/health-check-api/issues
- npm.io page: https://npm.io/package/health-check-api

## Dependencies (2)

- [request-promise](https://npm.io/package/request-promise.md) ^1.0.2
- [health-check-core](https://npm.io/package/health-check-core.md) 0.0.1

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2015-12-22
- 0.0.1 — 2015-12-22

## README

# Health Check API

## CI
[![Circle CI](https://circleci.com/gh/LucasRodrigues/health-check-api.svg?style=svg)](https://circleci.com/gh/LucasRodrigues/health-check-api)

## Install

```
$ npm install health-check-api
```

## Usage

### Code

```js
var healthCheckApi = require('health-check-api');

healthCheckApi.do([
{
  url: 'http://validurl.com/good',
  method: 'GET'
  expectedStatusCode: 202
},
{
  url: 'http://validurl2.com/whitoutStatusCode',
  method: 'POST'
},
{
    url: 'http://validurl.com/wrongStatusCode',
    method: 'GET',
    expectedStatusCode: 200
}])
 .then(function(result){
    console.log(result); 
    
    /* 
      { 
        health: false,
        success: 2,
        error: 1,
        details: 
          [ 
            { 
              name: 'http://validurl.com/good', 
              health: true, 
              message: '' 
            },
            { 
              name: 'http://validurl2.com/whitoutStatusCode', 
              health: true, 
              message: '' 
            },
            { 
              name: 'http://validurl.com/wrongStatusCode',
              health: false,
              message: 'Return with status code 500 expected 200' 
            } 
          ] 
      }
    */
 })
 .catch(function(error){
    console.log(error); 
 });
```

---
_Source: https://npm.io/package/health-check-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
