This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Notify Target ARN for Android device | |
'use strict'; | |
const AWS = require('aws-sdk'); | |
const sns = new AWS.SNS({ | |
apiVersion: '2010-03-31', | |
region: 'MY_REGION' | |
}); | |
if (process.argv.length < 3) { | |
console.log('Usage: node notify.js ENDPOINT_ARN'); | |
process.exit(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AWS = require('aws-sdk'); | |
AWS.config.update({accessKeyId: config.AWSAccessKeyId, secretAccessKey: config.AWSSecretKey,{region: config.AWSRegion}}); | |
var sns = AWS.SNS(); | |
var params ={ | |
Name:"test", | |
Platform:"GCM",//or APNS (Apple ) or ADM (Amazon) | |
Attributes:{ // required |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/* | |
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
* Modified from https://gist.github.com/paolorossi/1993068 | |
*/ | |
var http = require('http') | |
, fs = require('fs') | |
, util = require('util') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@server in express js file | |
var data = {}; | |
data.title = "My First APP"; | |
data.arr=[{x:1, y:1}, {x:2, y:2}, {x:3, y:4}]; | |
res.render('/ejsFile', data); |
NewerOlder