-
Notifications
You must be signed in to change notification settings - Fork 0
Firebase Functions
Gerardo Sullivan edited this page Oct 5, 2019
·
1 revision
Firebase Docs Youtube Tutorials
Navigate to Project Settings/Service accounts/Firebase Admin SDK and generate a new private key.
Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the file path of the JSON file that contains your generated private key
$env:GOOGLE_APPLICATION_CREDENTIALS="<PathToGeneratedPrivateKey>"
In your firebase functions index.ts file initialise the admin sdk.
admin.initializeApp({
credential: admin.credential.applicationDefault(),
databaseURL: "https://dev-knowledge-book.firebaseio.com"
});