1.0.0-beta • Published 4 years ago
@fizz.js/node-error-reporter v1.0.0-beta
@fizz.js/node-error-reporter
This is an error-reporter library for express.
install
add dependencies into package.json and run yarn install
configure
please put errorReporter config into config/${env}.json
and also need to set sendGrid and twilio config.
{
"errorReporter": {
"subject": "[SYSTEM ALERT]",
"text": "[SYSTEM ALERT] UNCAUGHT ERROR!!!",
"email": {
"from": "XXXXXXXXX",
"to": "XXXXXXXXX"
},
"phone": {
"from": {
"phoneNumber": "XXXXXXXXX",
"callPrefix": "XXXXXXXXX"
},
"to": {
"phoneNumber": "XXXXXXXXX",
"callPrefix": "XXXXXXXXX"
}
}
}
}or put ERROR_REPORTER_EMAIL_FROM,ERROR_REPORTER_EMAIL_TO,ERROR_REPORTER_PHONE_FROM,ERROR_REPORTER_PHONE_FROM_PREFIX, ERROR_REPORTER_PHONE_TO, ERROR_REPORTER_PHONE_TO_PREFIX into .env
ERROR_REPORTER_EMAIL_FROM="XXXXXXXX"
ERROR_REPORTER_EMAIL_TO="XXXXXXXX"
ERROR_REPORTER_PHONE_FROM="XXXXXXXX"
ERROR_REPORTER_PHONE_FROM_PREFIX="XXXXXXXX"
ERROR_REPORTER_PHONE_TO="XXXXXXXX"
ERROR_REPORTER_PHONE_TO_PREFIX="+XXXXXXXX"test
yarn testcoverage
yarn coverbuild
yarn builddocs
yarn docs1.0.0-beta
4 years ago