10bbaf56 by Julien Breux

Add examples

1 parent e1a7b66c
index.rendered.html
/node_modules/
\ No newline at end of file
node_modules
......
......@@ -10,6 +10,13 @@ Simple, self-hosted module based on Socket.io and Chart.js to report realtime se
`app.use(require('express-status-monitor')());`
3. Run server and go to `/status`
## Run examples
1. Go to `examples/`
2. Run `npm install`
3. Run server `node index.js`
4. Go to `http://0.0.0.0:3000`
## Options
Monitor can be configured by passing options object into `expressMonitor` constructor.
......
const express = require('express');
const app = express();
const config = {
path: '/',
title: 'Express Status',
spans: [{
interval: 1,
retention: 60
}, {
interval: 5,
retention: 60
}, {
interval: 15,
retention: 60
}]
}
app.use(require('../index')(config));
app.listen(3000, () => {
console.log('🌏 http://0.0.0.0:3000');
});
{
"name": "express-status-monitor-example",
"version": "0.0.1",
"description": "Examples",
"main": "index.js",
"author": "Rafal Wilinski raf.wilinski@gmail.com",
"contributors": [
{
"name": "Julien Breux",
"email": "julien.breux@gmail.com",
"url": "https://github.com/JulienBreux/"
}
],
"license": "MIT",
"dependencies": {
"express": "^4.14.0",
"on-headers": "^1.0.1",
"pidusage": "^1.0.4",
"socket.io": "^1.4.8"
}
}
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!