API/api.medcify.app/node_modules/tx2
2022-09-26 11:41:44 +05:30
..
example final 2022-09-26 11:41:44 +05:30
src final 2022-09-26 11:41:44 +05:30
test final 2022-09-26 11:41:44 +05:30
.travis.yml final 2022-09-26 11:41:44 +05:30
API.md final 2022-09-26 11:41:44 +05:30
index.js final 2022-09-26 11:41:44 +05:30
LICENSE final 2022-09-26 11:41:44 +05:30
package.json final 2022-09-26 11:41:44 +05:30
README.md final 2022-09-26 11:41:44 +05:30

tx2

Report Events, Metrics, Issues, Actions to PM2 and PM2.io.

const tx2 = require('tx2')

let body = { calories : 20 }
tx2.metric('burnt calories', () => body.calories)

tx2.action('lift weights', (cb) => {
  cb({ success: true })
})

Check API.md for full API doc.

Once you have created some metrics:

$ pm2 start app.js

Then run:

# Inspect primitive reported
$ pm2 show app

or go to pm2.io for web based interface + insights creation.

More

Generate documentation:

$ npm run doc

License

MIT