Skip to content

Instantly share code, notes, and snippets.

View abdelmajidrajad's full-sized avatar
🎯
Focusing

Rajad Abdelmajid abdelmajidrajad

🎯
Focusing
View GitHub Profile
@abdelmajidrajad
abdelmajidrajad / push.js
Created October 9, 2020 11:11 — forked from davideast/push.js
Send push notifications with node-apn and Firebase
var apn = require("apn");
var Firebase = require("firebase");
var service = new apn.connection({ production: false }); // true for production pipeline
// Create a reference to the push notification queue
var pushRef = new Firebase("<your-firebase>.firebaseio.com/notificationQueue");
// listen for items added to the queue
pushRef.on("child_added", function(snapshot) {