Skip to content

Instantly share code, notes, and snippets.

// The Cloud Functions for Firebase SDK to create Cloud Functions and set up triggers.
const functions = require('firebase-functions');
// Cloud Firestore: Node.js Client
const { Firestore } = require("@google-cloud/firestore");
// The Firebase Admin SDK to access Firestore.
const admin = require('firebase-admin');
admin.initializeApp();
const db = admin.firestore();