@fizz.js/node-error-reporter
v1.0.0-beta
Published
node-error-reporter
Downloads
1
Readme
@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 test
coverage
yarn cover
build
yarn build
docs
yarn docs