Last active
March 30, 2021 20:42
-
-
Save acoyfellow/c1f420952e54550afb75084e04319e04 to your computer and use it in GitHub Desktop.
Example using firebase-admin in SK
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"; | |
if (!admin.apps.length) { | |
admin.initializeApp({ | |
credential: admin.credential.applicationDefault(), | |
databaseURL: 'your-url' // ... | |
}); | |
}; | |
const firebase = admin; | |
const firestore = admin.firestore(); | |
const auth = admin.auth(); | |
const storage = admin.storage(); | |
export { firebase, firestore, auth, storage }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment