Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 1 day 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 (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-21T12:52:54.000Z (almost 6 years ago)
- Last Synced: 2024-10-17T03:44:27.354Z (21 days ago)
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 10
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aws-sns-subscription-confirmation [![Build Status](https://travis-ci.org/Collaborne/aws-sns-subscription-confirmation.svg?branch=master)](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());
```