Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/plehegar/express-monitor
Node.js Express Server monitor
https://github.com/plehegar/express-monitor
Last synced: 15 days ago
JSON representation
Node.js Express Server monitor
- Host: GitHub
- URL: https://github.com/plehegar/express-monitor
- Owner: plehegar
- License: mit
- Created: 2018-05-23T13:10:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-10T23:46:10.000Z (almost 4 years ago)
- Last Synced: 2024-11-29T22:51:12.325Z (about 1 month ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# express-monitor
Node.js Express Server monitor
Use monitor.js in your express pp.
```js
const monitor = require('./monitor.js');
var app = express();
monitor.install(app, [options]);
// options.path - HTTP root path for the monitor, default is /monitor
// options.entries - max number of entries to return in the log
// This will expose the following resources
// /monitor/logs
// /monitor/ping
/// /monitor/usage
```if you want server timing, add the following after all router/middleware
```js
monitor.stats(app);
```and don't forget to use next() im between for each router/middleware
you'll then see those time info added to the logUse monitor.html?services=url[;url]* to actively monitor your service using a Web browser