10bbaf56 by Julien Breux

Add examples

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