alert-sender

1.0.7 • Public • Published

To install:

npm install alert-sender --save

Usage:

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

/alert-sender/

    Package Sidebar

    Install

    npm i alert-sender

    Weekly Downloads

    2

    Version

    1.0.7

    License

    Apache 2.0

    Unpacked Size

    6.45 kB

    Total Files

    6

    Last publish

    Collaborators

    • haalcala