Created
February 1, 2019 00:18
-
-
Save wovalle/1192ce06c526f79684b28d5fb66c6c56 to your computer and use it in GitHub Desktop.
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 * as admin from 'firebase-admin'; | |
const serviceAccount = require('../firestore.creds.json'); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), | |
databaseURL: `https://${serviceAccount.project_id}.firebaseio.com`, | |
}); | |
const firestore = admin.firestore(); | |
firestore.settings({ | |
timestampsInSnapshots: true, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment