@tvorilas/node-healthchecker
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Dependencies free library for docker container healthcheck using fs

npm i @tvorilas/node-healthchecker

Using on app side

import { HealthcheckServer } from '@tvorilas/node-healthchecker'
const healthcheckServer = new HealthcheckServer('/app/healthcheck.txt')

// Do something and call this method
healthcheckServer.ping()

Using in compose-file

services:
  app:
    healthcheck:
      test: ["CMD", "node", "run", "health-check", "--", "/app/healthcheck.txt", "120000"] # 2 minutes in ms
      interval: 5s
      timeout: 20s
      retries: 10

Readme

Keywords

none

Package Sidebar

Install

npm i @tvorilas/node-healthchecker

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

11.8 kB

Total Files

11

Last publish

Collaborators

  • beatlelab