@shopify/koa-liveness-ping
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

@shopify/koa-liveness-ping

Build Status Build Status License: MIT npm version

A package for creating liveness ping middleware for use with Koa.

A liveness ping is a URL at which your application will respond with a 200 whenever your server is running. It can be used, for example, for liveness checks in Kubernetes deployments.

Installation

yarn add @shopify/koa-liveness-ping

Usage

import Koa from 'koa';
import ping from '@shopify/koa-liveness-ping';

const app = new Koa();

// set up any error or loggin middlewares

app.use(ping());

// other routing middlewares should go after the liveness ping

This middleware can also be mounted at any path via koa-mount (Learn more).

Note: Mount the liveness ping middleware before all other routing-related middleware in order to ensure it can respond quickly and reliably.

Readme

Keywords

none

Package Sidebar

Install

npm i @shopify/koa-liveness-ping

Weekly Downloads

272

Version

2.1.1

License

MIT

Unpacked Size

3.97 kB

Total Files

10

Last publish

Collaborators

  • jaimie.rockburn
  • blittle
  • shopify-admin
  • maryharte
  • crisfmb
  • pmoloney89
  • netlohan
  • st999999
  • justin-irl
  • megswim
  • wcandillon
  • nathanpjf
  • shopify-dep
  • goodforonefare
  • lemonmade
  • vsumner
  • wizardlyhel
  • antoine.grant
  • tsov
  • andyw8-shopify
  • henrytao
  • hannachen
  • vividviolet
  • bpscott