【文件属性】:
文件名称:zero-statistic:零的统计模块
文件大小:3KB
文件格式:ZIP
更新时间:2021-07-10 21:56:43
JavaScript
零统计
此模块可帮助您记录请求或总线事件。
用法
将依赖项添加到您的模块 package.json 文件中,例如:
{
"name" : "YOUR_MODULE_NAME",
"zero" : {
"dependencies" : {
"statistics" : "^0.0.1"
}
}
}
在您的模块中声明statistics :
module.exports = {
statistics : {
log : {
"GET /post/*" : "daily",
"rest.fire.after" : {
strategy : "feed",
argv : ["post"]
}
}
}
}
只需访问/statistic?type=GET /post/*-daily即可获得结果。
【文件预览】:
zero-statistic-master
----models.js(109B)
----README.md(524B)
----strategy.js(1KB)
----index.js(3KB)
----package.json(329B)