Created
May 7, 2020 22:02
-
-
Save Happytreat/2247fecc682d285158a85b5f9bfd3eda to your computer and use it in GitHub Desktop.
Firestore init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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