sendnotification

1.1.1 • Public • Published

Send Notification

npm version Coverage Status Build Status

Relay notifications based in stdin data

echo "5000" | sendnotification SNS "SNS_TOPIC_IDENTIFIER" "the current balance is %d"

// the current balance is 5000

Configuration

Set environment variables or setup ~/.sendnotification/.env

# AWS configuration settings
AWS_ACCESS_KEY_ID=""
AWS_REGION=""
AWS_SECRET_ACCESS_KEY=""

# Mailjet configuration settings
MJ_APIKEY_PRIVATE=""
MJ_APIKEY_PUBLIC=""

Docker

There is an included Docker file, as well as a public image at alexbosworth/sendnotification

Example usage with Docker, referencing a .env file with the environment variables encoded:

echo "5000" | docker run -i --rm --env-file .env alexbosworth/sendnotification SNS "sns-topic-id" "the current balance is %d"

This should post the notification body to the specified topic, with the sprintf'ed contents

Dependencies (5)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i sendnotification

    Weekly Downloads

    0

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    12.1 kB

    Total Files

    15

    Last publish

    Collaborators

    • alexbosworth