greenfox-heartbeat

1.0.0 • Public • Published

huli-heartbeat-nodejs

'/heartbeat' endpoint which returns with a JSON if the database connection is established and with a status 500 ('Internal server error') if the connection is down.

Install

Must need

npm package manager installed

To install the heartbeat package use $ npm install greenfox-heartbeat --save-dev in command line. This will automatically add the package to your development dependencies in the package.json file as well.

Usage

After installation open config.js and edit the server info.

Require the package with

let heartbeat = require('./heartbeat')

and insert the '/heartbeat' endpoint

app.get('/heartbeat', heartbeat(connection))

Readme

Keywords

none

Package Sidebar

Install

npm i greenfox-heartbeat

Weekly Downloads

3

Version

1.0.0

License

ISC

Unpacked Size

4.25 kB

Total Files

6

Last publish

Collaborators

  • aholcsik