Created
June 22, 2018 20:02
-
-
Save manduks/cc6c044fa3eed0e48614136a0a4d04b2 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
const admin = require('firebase-admin'); | |
var serviceAccount = require('path/to/serviceAccountKey.json'); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount) | |
}); | |
db.collection('locations').get() | |
.then((snapshot) => { | |
snapshot.forEach((doc) => { | |
console.log(doc.id, '=>', doc.data()); | |
}); | |
}) | |
.catch((err) => { | |
console.log('Error getting documents', err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment