Skip to content

Instantly share code, notes, and snippets.

@Happytreat
Created May 7, 2020 22:02
Show Gist options
  • Save Happytreat/2247fecc682d285158a85b5f9bfd3eda to your computer and use it in GitHub Desktop.
Save Happytreat/2247fecc682d285158a85b5f9bfd3eda to your computer and use it in GitHub Desktop.
Firestore init
import admin from 'firebase-admin'
// Learn how to get your serviceAccountKey from https://firebase.google.com/docs/firestore/quickstart
let serviceAccountKey = require('../serviceAccountKey.json')
admin.initializeApp({
credential: admin.credential.cert(serviceAccountKey),
})
const db = admin.firestore();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment