Socket
Book a DemoInstallSign in
Socket

gm-mtr-health

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

gm-mtr-health

Library ini akan melakukan pengecekan tiap service ### Dependency Library ini menggunakan package [**@godaddy/terminus v4.1.2**](https://www.npmjs.com/package/@godaddy/terminus). ### Installation ```bash npm i git+ssh://git@repository.meteor.co.id/mt

1.0.0
unpublished
latest
npmnpm
Version published
Maintainers
1
Created
Source

Health Check Library

Library ini akan melakukan pengecekan tiap service

Dependency

Library ini menggunakan package @godaddy/terminus v4.1.2.

Installation

npm i git+ssh://git@repository.meteor.co.id/mtr-platform/libs/health

Penggunaan

Deklarasikan module library di dalam file index.js.

const healthz = require('mtr-health');

const { env } = process;
const svc = env.SVC_NAME || 'Meteor';
const host = env.HOST || 'localhost';
const port = Number(env.PORT) || 3000;

const server = http.createServer(app);
const conParam = { timeout, extFuncOnSignal, extFunconShutdown, extFuncbeforeShutdown, extFunchealthChecks };
// extFuncOnSignal is a function or array of extended functions(s) to run on 1st line
// extFunconShutdown is a function or array of extended functions(s) to run on 1st line
// extFuncbeforeShutdown is a function or array of extended functions(s) to run on 1st line
// extFunchealthChecks is a function or array of extended functions(s) to run on 1st line

if (process.env.NODE_ENV === 'production') healthz.healthCheck(server, conParam);
server.listen(port)
  .on('error', err => healthz.onError(err, port))
  .on('listening', () => healthz.onListening(svc, host, port, extFuncListen));
  // extFuncError is a function or array of extended functions(s) to run on 1st line
  // extFuncListen is a function or array of extended functions(s) to run on 1st line

FAQs

Package last updated on 08 Sep 2022

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.