1.1.1 • Published 11 months ago

node-request-monitor v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Node Request Monitor

Node Request Monitor is a lightweight Node.js package designed for monitoring HTTP requests in your application. It displays real-time charts for requests per second, minute, and hour, and shows log data with color-coded HTTP status codes directly in a web page.

Installation

Use the package manager npm to install Node Request Monitor.

npm install node-request-monitor

Usage

const express = require('express');
const RequestMonitor = require('node-request-monitor');
const app = express();
const monitor = new RequestMonitor(app);

app.get('/api/some-endpoint', (req, res) => {
    res.send('API response');
});

app.listen(3000, () => {
    console.log('Server is running on http://localhost:3000');
});

You can view dashboard on

http://localhost:3000/api/monitor-dashboard

If you want the JSON data, you can request it from

http://localhost:3000/api/monitor

Visuals

Here is a screenshot of the monitoring dashboard:

Monitoring Dashboard

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

1.1.1

11 months ago

1.1.0

11 months ago

1.0.0

11 months ago