1.0.0 • Published 6 years ago

greenfox-heartbeat v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

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))
1.0.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago