Skip to content

Instantly share code, notes, and snippets.

View n1lesh's full-sized avatar
🏠
Working from home

Nilesh Singh n1lesh

🏠
Working from home
View GitHub Profile
@n1lesh
n1lesh / fcm6.js
Created December 23, 2017 09:06
Firebase Cloud Messaging with Node.js - FCM 6
app.post('/notify', (req, res) => {
let msg = req.body.message,
title = req.body.title,
type = req.body.type,
topic = req.body.topic
if (type === 'topic') {
sendToTopics(msg, title, topic, res)
} else {
@n1lesh
n1lesh / notifcenter.html
Created December 23, 2017 09:06
Firebase Cloud Messaging with Node.js - Notification Center (HTML)
<!DOCTYPE html>
<html>
<head>
<title>Notification Center</title>
<style>
body {
text-align: center;
}
h1 {