# koa-health-probe

> Health probe for Koa

Latest version **1.0.3** (published 2019-02-11) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install koa-health-probe
pnpm add koa-health-probe
yarn add koa-health-probe
bun add koa-health-probe
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-02-11 |
| First published | 2019-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kat Lim Ruiz |
| Maintainers | katlimruiz |
| Keywords | koa |

## Links

- npm: https://www.npmjs.com/package/koa-health-probe
- Repository: https://github.com/katlimruiz/koa-health-probe
- Homepage: https://github.com/katlimruiz/koa-health-probe#readme
- Issues: https://github.com/katlimruiz/koa-health-probe/issues
- npm.io page: https://npm.io/package/koa-health-probe

## Dependencies (3)

- [koa](https://npm.io/package/koa.md) ^2.7.0
- [process](https://npm.io/package/process.md) ^0.11.10
- [koa-router](https://npm.io/package/koa-router.md) ^7.4.0

## Recent versions

- 1.0.3 (latest) — 2019-02-11
- 1.0.2 — 2019-02-08
- 1.0.1 — 2019-02-08
- 1.0.0 — 2019-02-08

## README

# koa-health-probe
Health probe for Koa that uses http://github.com/katlimruiz/koa-last-request to provide a bit meaningful info

## Usage
```
const Koa = require('koa');
const KoaRouter = require('koa-router');
const setupKoaHealthProbe = require('koa-health-probe');

// create koa app
var app = new Koa();
var router = new KoaRouter();

// setup the probe
setupKoaHealthProbe(router, youroptions);

// setup routes on the app
app.use(router.routes()).use(router.allowedMethods());

```

## Options

```
var options = {
    // route path to use, default is /tools/probe
    path: string,
    // function to customize the object returned for every probe tryout
    onRequest: function
}
```

## Optional dependency on http://github.com/katlimruiz/koa-last-request

The package `koa-last-request` is used to provide the last timestamp the koa app has processed something (you can configure it to ignore certain paths, for example, this probe :)).
If the package is not present, then the timestamp is not generated.

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