Skip to content

Instantly share code, notes, and snippets.

View benedictcontawe's full-sized avatar

Benedict Contawe benedictcontawe

View GitHub Profile
@adityathakurxd
adityathakurxd / index.js
Last active October 22, 2024 16:35
Node Server code to use Firebase Admin SDK to send out push notifications. When a post endpoint is hit on the Node JS server, it delivers a notification to a Flutter app using Firebase Messaging.
import {initializeApp, applicationDefault } from 'firebase-admin/app';
import { getMessaging } from "firebase-admin/messaging";
import express, { json } from "express";
import cors from "cors";
process.env.GOOGLE_APPLICATION_CREDENTIALS;
const app = express();
app.use(express.json());