I have node app with service account based access, so I used firebase-admin
. As I could see before, firebase-admin
mostly duplicated firebase
package (except for authentication part, signatures and maybe some other parts), but now I want to invoke functions and I can't find any equivalent for firebase.apps[0].functions().httpsCallable('myFunction')
. I looked into Typescript typings, and they don't even mention functions.
admin.initializeApp({
credential: admin.credential.cert('./service-account-credentials.json'),
databaseURL: process.env.REACT_APP_FIREBASE_DATABASE_URL,
});
const config = {
storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET,
};
const storageBucket = admin.storage().bucket(config.storageBucket);
const firestore = admin.firestore();
// const functions = admin.apps[0].functions(); // not possible
const functions = firebase.apps[0].functions(); // possible, but Firestore.apps not initialized
What are my options?