Improve README.md and add new gif
Showing
2 changed files
with
27 additions
and
3 deletions
1 | #### express-monitor | 1 | # express-monitor |
2 | A module based on Socket.io and Chart.js to report realtime server metrics for Express-based node servers. | 2 | A module based on Socket.io and Chart.js to report realtime server metrics for Express-based node servers. More Node frameworks coming soon. |
3 | 3 | ||
4 |  | 4 |  |
5 | 5 | ||
6 | ### How to use it (in progress) | 6 | ## How to use it (in progress) |
7 | 1. Add this as a dependency (will be on NPM soon) | 7 | 1. Add this as a dependency (will be on NPM soon) |
8 | 2. Before any other middleware or router add following line: | 8 | 2. Before any other middleware or router add following line: |
9 | `app.use(expressMonitor());` | 9 | `app.use(expressMonitor());` |
10 | 3. Run server and to go `/status` | 10 | 3. Run server and to go `/status` |
11 | 11 | ||
12 | ## Options | ||
13 | |||
14 | Monitor can be configured by passing options object into `expressMonitor` constructor. | ||
15 | |||
16 | Default config: | ||
17 | ``` | ||
18 | path: '/status', | ||
19 | socketPort: 41338, // Port for Socket.io communication | ||
20 | spans: [{ | ||
21 | interval: 1, // Every second | ||
22 | retention: 60 // Keep 60 datapoints in memory | ||
23 | }, { | ||
24 | interval: 5, // Every 5 seconds | ||
25 | retention: 60 | ||
26 | }, { | ||
27 | interval: 15, // Every 15 seconds | ||
28 | retention: 60 | ||
29 | }] | ||
30 | |||
31 | ``` | ||
32 | |||
33 | ## License | ||
34 | |||
35 | [MIT License](https://opensource.org/licenses/MIT) 漏 Rafal Wilinski | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment