1.0.1 • Published 5 years ago

@tvorilas/node-healthchecker v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

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