under nodejs i did :
npm install firebase --save
then i do
var firebase = require("firebase");
// Initialize Firebase
var config = {
apiKey: "...",
authDomain: "...,
databaseURL: "....",
projectId: "....",
storageBucket: "....",
messagingSenderId: "...."
};
firebase.initializeApp(config);
const messaging = firebase.messaging(); << crash here
but it's crash saying firebase.messaging is not a function
Is their any way to run firebase messaging in node.js to listen notification ? their is the file /node_modules/firebase/firebase-messaging.js but it's obfuscate and i can't understand it and what it's does
via loki
No comments:
Post a Comment