【文件属性】:
文件名称:Apple.Google.PushScripts:我的微型 Node.js 脚本将推送通知发送到 Android 和 iOS 设备
文件大小:5KB
文件格式:ZIP
更新时间:2021-07-10 16:48:26
JavaScript
Node.js 推送通知脚本
向 Apple 和 Google 设备发送推送通知的基本 node.js 脚本。
先决条件
节点 + NPM
$ npm install
跑前准备
您必须将有效的设备 uuid 添加到 Google 的registrationIds中
var registrationIds = [
// 'my device keys goes here'
];
或在运行脚本之前进入 Apple devices 。
var devices = [
// 'my device keys goes here'
];
可以在此处找到创建 .pem 文件的链接( ) 或按照此链接从 Apple 生成必要的 .p12 证书。 ( )
怎么跑
$ node lib/googlePush.js
$ node lib/applePush.js
执照
麻省理工学院许可
【文件预览】:
Apple.Google.PushScripts-master
----package.json(623B)
----LICENSE(1KB)
----certs()
--------myCertificate.p12(99B)
--------Cert.pem(90B)
--------Key.pem(90B)
----lib()
--------applePush.js(841B)
--------googlePush.js(726B)
----README.md(2KB)