1.0.7 • Published 7 years ago
alert-sender v1.0.7
To install:
npm install alert-sender --saveUsage:
var alert_sender = require("alert-sender");To configure:
alert_sender.configure({
sns: {
"type" : "sns",
"accessKeyId" : "",
"secretAccessKey" : "",
"region" : "",
"topic" : "",
},
ses: { // not supported yet
"type" : "ses",
"accessKeyId" : "",
"secretAccessKey" : "",
"region" : "",
"sender" : "",
}
smtp: { // not supported yet
host : "",
port : "",
username : "",
password : "",
sender : "",
}
});In the above codes, the 'sns' becomes the default channel because it's the first one or if the only configuration in the list. Alternatively, you can say default_channel = 'sns'
To send:
alert_sender.send("Test " + new Date());or
alert_sender.send("Test " + new Date(), "sns");More advanced configuration later