文件名称:tx2:指标,问题,操作,事件报告库
文件大小:15KB
文件格式:ZIP
更新时间:2024-06-13 01:46:52
JavaScript
tx2 向PM2和PM2.io报告事件,度量,问题,操作。 const tx2 = require ( 'tx2' ) let body = { calories : 20 } tx2 . metric ( 'burnt calories' , ( ) => body . calories ) tx2 . action ( 'lift weights' , ( cb ) => { cb ( { success : true } ) } ) 检查以获取完整的API文档。 创建一些指标后,请执行以下操作: $ pm2 start app.js 然后运行: # Inspect primitive reported $ pm2 show app 或访问pm2.io进行基于Web的界面和见解的创建。 更多的 生成文档: $ npm run doc 执照 麻省理工学院
【文件预览】:
tx2-main
----src()
--------utils()
--------issues.js(1KB)
--------metrics.js(6KB)
--------events.js(662B)
--------actions.js(2KB)
--------index.js(1KB)
----.travis.yml(125B)
----example()
--------events.js(486B)
----LICENSE(1KB)
----test()
--------issue.mocha.js(540B)
--------action.mocha.js(381B)
--------metric.mocha.js(1KB)
--------event.mocha.js(520B)
----README.md(578B)
----API.md(3KB)
----.gitignore(31B)
----index.js(59B)
----CHANGELOG.md(28B)
----package.json(433B)