Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evanshortiss/sns-mobile-example
A simple example of how to use the sns-mobile node.js module.
https://github.com/evanshortiss/sns-mobile-example
Last synced: 4 days ago
JSON representation
A simple example of how to use the sns-mobile node.js module.
- Host: GitHub
- URL: https://github.com/evanshortiss/sns-mobile-example
- Owner: evanshortiss
- Created: 2013-12-20T22:13:59.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-09T18:12:01.000Z (about 9 years ago)
- Last Synced: 2024-11-02T11:11:43.507Z (11 days ago)
- Language: JavaScript
- Size: 119 KB
- Stars: 13
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
###SNS (sns-mobile) Module Example
This repository is simply an example of how the sns-mobile module could be exposed to register users for Push Notifications.Using an express webserver it exposes a single route that can be called to register a device for Push Notifications. This is a trivial example without database interaction for user accounts etc.
To run this simply do the following:
```
git clone [email protected]:evanshortiss/sns-mobile-example.git
cd sns-mobile-example
npm install .
node index.js
```You'll need to configure the following three environment variables:
* SNS_KEY_ID (Secret Key for an AWS user)
* SNS_ACCESS_KEY (Access Key for an AWS user)
* SNS_ANDROID_ARN (PlatformApplicationArn for your Android (GCM) SNS application)To add fake users you can do the following curl request:
```
curl --data "deviceId=some_fake_device_id_for_app" http://127.0.0.1:3000/register
```