light-fcm-push

A light lib to Firebase Cloud Messaging (FCM) for Android and iOS


Keywords
fcm, gcm, push, notification, push notification, firebase, firebase cloud messaging, google, android, ios, light fcm, fcm-notifications, firebase-cloud-messaging, light-fcm, push-notifications
License
ISC
Install
npm install light-fcm-push@1.0.41

Documentation

light-fcm-push

A light module focused on Firebase Clud Messaging for AWS Lambda.

Use example

var fcm = require('light-fcm-push');
var serverKey = "your server key";
var message = {
    to: token,
    priority: "normal",  //must be normal or high
    notification: {
       title: "Push Title",
       body: "Push content"
    },
    data: { //Optional
       yourOwnKey: "content for this key",
       otherKey: "content"
    }
 };
 //This will return a promisse
 return fcm.send(message, serverKey);