healthy-heb

2.2.0 • Public • Published

Healthy Check HEB

Review of the applied third-party services, obtains the assessment of the state in which they are found

Dependencies:

  • amqplib
  • pg Only connection postgres Custom Service
npm install healthy-heb

Integrations

  • Web integration (https)
  • Rabbitmq
  • Database
    • postgres

Use

// Express config ....

const { Healthy, HealthyTypes } = require('healthy-heb')

const options = {
  name: "My node application",
  version: "my version",
  integrations: [
    {
      type: HealthyTypes.Rabbit,
      alias: "My alias",
      host: 'localhost',
      protocol: 'amqp',
      hostname: 'localhost',
      port: 5672,
      username: 'xx',
      password: 'xx',
      vhost: 'xx',
    },
    {
      type: HealthyTypes.Postgres,
      alias: "My alias",
      user: 'xx',
      host: 'localhost',
      database: 'xx',
      password: 'xx',
      port: 5432,
    },
    {
      type: HealthyTypes.Web,
      alias: "My alias",
      host: "https://github.com/status",
      headers: [{ key: "Accept", value: "application/json" }]
    }
  ]
}

router.get('/live', async (_, res) => {
  res.send(await Healthy(options))
})

Note: As far as possible, contribute to the original project

Readme

Keywords

Package Sidebar

Install

npm i healthy-heb

Weekly Downloads

22

Version

2.2.0

License

ISC

Unpacked Size

6.79 kB

Total Files

13

Last publish

Collaborators

  • jousmo