Skip to content

Commit 4e0965b

Browse files
committed
add readme
1 parent 32fc4db commit 4e0965b

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
11
### daruk-monitor-middleware
22

3-
A nodejs use typescript project
3+
A monitor from v8-profiler-node8 for [Daruk](https://darukjs.github.io/daruk.org)
4+
5+
## Installation scaffolding
6+
7+
```bash
8+
9+
$ cnpm i -g daruk-monitor-middleware
10+
11+
```
12+
13+
## How to use in your daruk project
14+
15+
Find your daruk config file
16+
17+
```typescript
18+
//daruk.config.ts
19+
darukConfig.middleware = {
20+
'daruk-monitor-middleware': (mid: Function) => {
21+
return mid({
22+
auth: {
23+
name: 'monitor',
24+
password: 'monitor'
25+
}
26+
});
27+
}
28+
};
29+
30+
//push it into the middleware list
31+
darukConfig.middlewareOrder = ['daruk-monitor-middleware'];
32+
```
33+
34+
## Your can view the data from Api:
35+
36+
### /monitor/profiler
37+
38+
### /monitor/profiler/function
39+
40+
### /monitor/profiler/mem
41+
42+
### /monitor/profiler/mem-analytics
43+
44+
## LICENSE
45+
46+
### MIT License

0 commit comments

Comments
 (0)