0.4.0 • Published 9 years ago

express-aws-sns v0.4.0

Weekly downloads
176
License
-
Repository
github
Last release
9 years ago

AWS SNS Express middleware

This has been adapted from https://github.com/mattrobenolt/node-snsclient to better support express. If you just want a standalone client without express you're better off using that one.

Installation

$ npm install express-aws-sns

Usage

var express = require('express'),
    sns = require('express-aws-sns'),
    app = express();

app.use(sns());

Perform no verification (not recommended except for debugging):

app.use(sns({
    verify: false
}));

Ensure topic:

app.use(sns({
    topic: 'aws:sns:arn:xxx:yyy:zzz'
}));

By default, the message will be attached to the request in the snsMessage property. It can be accessed via req.snsMessage.