dpd-fcm
Version:
send push notif to client, using Firebase Cloud Messaging
30 lines (21 loc) • 671 B
Markdown
# FCM Push notifications for Deployd
## Install
npm install dpd-fcm --save
## Configure
1. Read [Configure FCM Server](https://firebase.google.com/docs/cloud-messaging/server)
2. Create a FCM resource in Dashboard
3. Set your SERVER_KEY in Settings
## Usage
dpd.resourcename.post(
{ "notification": {
"title": "Portugal vs. Denmark",
"text": "5 to 1"
},
"to" : "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1..."
},
function(result, err) {
console.log(result);
}
);
## Reff
For more information about params and result, [here](https://firebase.google.com/docs/cloud-messaging/downstream).