connio-health

    1.1.3 • Public • Published

    connio-health

    A light /health route for the Express framework as connect middleware.

    Useful for monitoring when application is ready to serve traffic by adding /health endpoint.

    It delivers a following JSON payload:

    {
      "app": "connio.app",
      "version": "1.0.0",
      "memory": {
        "rss": 95416320,
        "heapTotal": 64826112,
        "heapUsed": 42684560
      }
    }
    
    • name - app name from package.json
    • version - app version from package.json
    • memory
      • rss - resident set size in bytes
      • heapTotal - heap total in bytes
      • heapUsed - used heap in bytes

    Getting Started

    $ npm install --save connio-health
    

    In your configuration file:

    var health = require('connio-health')
    ...
    app.use(health())
    

    By default it uses path of main file in package.json as root path.

    You can also configure app root path manually:

    app.use(health(__dirname + '/server'))
    

    Install

    npm i connio-health

    DownloadsWeekly Downloads

    3

    Version

    1.1.3

    License

    MIT

    Last publish

    Collaborators

    • vivanov1410