零统计
此模块可帮助您记录请求或总线事件。
用法
将依赖项添加到您的模块 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即可获得结果。
评论0
最新资源