My function works in firebase Project A, but need access firestore in Project B, with recommended code snippet typeSaurus only talked with Project A, rather than B. I got this error "The Cloud Firestore API is not available for Datastore Mode projects."
import * as admin from 'firebase-admin'
import { collection, get, all, query, where } from 'typesaurus'
admin.initializeApp() // default init
admin.initializeApp({project-A-config-option}) // Project A init
admin.initializeApp({project-B-config-option}) // Project B init
type User = { name: string }
const users = collection<User>('users')
// Query collection
query(users, [where('name', '===', 'Sasha')]) // ==> this won't work, and complains with error ''The Cloud Firestore API is not available for Datastore Mode projects."
I can understand typeSaurus is trying to connect with fireStore of Project A, but how to talk with Project B?
Hello man,
My function works in firebase Project A, but need access firestore in Project B, with recommended code snippet typeSaurus only talked with Project A, rather than B. I got this error "The Cloud Firestore API is not available for Datastore Mode projects."
I can understand typeSaurus is trying to connect with fireStore of Project A, but how to talk with Project B?
Thanks very much. Regard Zhen