Created
November 1, 2018 14:00
-
-
Save PierBover/89ebb294fd0376a24c27bdbbf1f61966 to your computer and use it in GitHub Desktop.
Firebase cloud function admin 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
const admin = require("firebase-admin"); | |
const serviceAccount = require("./service-account.json"); | |
if (admin.apps.length === 0) { | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), | |
databaseURL: "https://XXXXX.firebaseio.com" | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment