https://github.com/anvk/apple.google.pushscripts
My tiny Node.js scripts to send push notifications to Android and iOS devices
https://github.com/anvk/apple.google.pushscripts
Last synced: 3 months ago
JSON representation
My tiny Node.js scripts to send push notifications to Android and iOS devices
- Host: GitHub
- URL: https://github.com/anvk/apple.google.pushscripts
- Owner: anvk
- License: mit
- Created: 2014-11-27T02:12:10.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-28T18:17:38.000Z (about 11 years ago)
- Last Synced: 2025-10-25T05:03:39.000Z (3 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Node.js push notification scripts
========
> Basic node.js scripts to send push notification to Apple and Google devices.
### Prerequisites
Node + NPM
```
$ npm install
```
### Prepare before the run
You have to add valied device uuids into `registrationIds` for Google
```
var registrationIds = [
// 'my device keys goes here'
];
```
or into `devices` for Apple before you run the script.
```
var devices = [
// 'my device keys goes here'
];
```
Link to create .pem files could be found here (http://www.apptuitions.com/generate-pem-file-for-push-notification/)
OR follow this link to generate a necessary .p12 certificate from Apple. (http://appfurnace.com/2012/11/publishing-your-apps-how-to-create-a-p12-file/)
### How to run
```
$ node lib/googlePush.js
```
```
$ node lib/applePush.js
```
## License
The MIT License (MIT)
Copyright (c) 2014 Alexey Novak
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.