1.0.2 • Published 2 years ago

restapi_dashboard v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

express-status-monitor on npm npm

Development in progress

The development of this project is ongoing, new vertions are published every day.

Self-host your own monitoring dashboard for your RestAPI based on Express. Get request statistics and track the status of your server in real time.

Installation & setup

  1. Run
    npm i restapi_dashboard --save
  1. Add the line before all other middleware:
    const express = require("express");
    const app = express();

    // Add this line before all other middleware
    app.use(require('restapi_dashboard')());

    app.listen(80, () => {
        console.log(`Express server is running : http://localhost/`);
    });
  1. Visit http://localhost/restapiDashboard

Note: This plugin works on Node versions > 4.x

Configuration

You can change the configuration:

    const config = {
        path: '/custom',
        ignorePaths: [ '/staff' ],
    }
    
    app.use(require('restapi_dashboard')(config));

Default config:

    path: '/restapiDashboard',
    ignorePaths: [ '/public', '/favicon.ico', '/admin' ],
    recoveredData: {
        cpu: true,
        memory: true,
        load: true,
        eventLoop: true,
        heap: true,
        responseTime: true,

        totalRequests: true,
        httpStatusCodes: true,
        requestedRoutes: true
    }

Recovered Data:

  • totalRequests : Total number of requests received by the service per seconde
  • httpStatus : Monitor the status of request responses
  • requestedRoutes : Monitor the number of times each route has been called up
1.0.3

2 years ago

1.0.2

2 years ago