https://github.com/collaborne/aws-sns-subscription-confirmation
Express middleware (NodeJS) to respond to SNS subscription confirmations
https://github.com/collaborne/aws-sns-subscription-confirmation
Last synced: about 1 year ago
JSON representation
Express middleware (NodeJS) to respond to SNS subscription confirmations
- Host: GitHub
- URL: https://github.com/collaborne/aws-sns-subscription-confirmation
- Owner: Collaborne
- License: apache-2.0
- Created: 2017-05-15T15:25:47.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-21T12:52:54.000Z (over 7 years ago)
- Last Synced: 2025-03-21T22:38:49.858Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 11
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aws-sns-subscription-confirmation [](https://travis-ci.org/Collaborne/aws-sns-subscription-confirmation)
Express middleware (NodeJS) to respond to [SNS subscription confirmations](http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html).
## Usage
Install the library:
```bash
npm install aws-sns-subscription-confirmation
```
Use the library in your express application:
```javascript
const express = require('express');
const bodyParser = require('body-parser');
const snsSubscriptionConfirmation = require('aws-sns-subscription-confirmation');
const app = express();
// Fix the wrong request content-type as required by the body-parser
app.use(snsSubscriptionConfirmation.overrideContentType());
app.use(bodyParser.json());
app.use(snsSubscriptionConfirmation.snsConfirmHandler());
```