Firebase Functions - Gerardo-Sullivan/dev-knowledge-book GitHub Wiki
Firebase Functions
Firebase Docs Youtube Tutorials
Local Debug
Firebase Admin SDK
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"
});