Socket
Socket
Sign inDemoInstall

@appliedblockchain/koa-healthcheck

Package Overview
Dependencies
Maintainers
26
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appliedblockchain/koa-healthcheck

Koa healthcheck middleware


Version published
Weekly downloads
61
decreased by-19.74%
Maintainers
26
Weekly downloads
 
Created
Source

Koa Healthcheck Middleware

Installation:

npm -i @appliedblockchain/koa-healthcheck

and in your application:

const healthcheck = require('@appliedblockchain/koa-healthcheck');

The default will use the path /health:

app.use(healthcheck())

With a custom path:

app.use(healthcheck({ path: '/custompath' }))

With a custom report object (appended):

app.use(healthcheck({ custom: {
  foo: 'bar',
  bin: () => 'baz'
} }))
Healthcheck Token:

If healthcheck token is not provided, healthcheck would not show detail information about server.

const HEALTH_TOKEN = 'example-token-1234567890'

app.use(healthcheck({ custom: {
  foo: 'bar',
  bin: () => 'baz'
}}, HEALTH_TOKEN ))

Provides detail information about server:

curl -X GET  -H "health-token:example-token-1234567890" localhost:3000/health

Provides minimal/custom information only:

curl -X GET localhost:3000/health

FAQs

Package last updated on 05 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc