我在Firebase Project-A和Project-B中创建了两个不同的项目。我正在开发使用html,css和javascript的Web应用程序,并将其(托管)部署到Project-A。我想将数据从Project-B导入到我的Web应用程序中。我已经在Web应用程序中配置了两个项目,如下所示:
var config = {
apiKey: "<API_KEY>",
authDomain: "<PROJECT_ID>.firebaseapp.com",
databaseURL: "https://<DATABASE_NAME>.firebaseio.com",
storageBucket: "<BUCKET>.appspot.com",
};
var secondaryAppConfig = {
apiKey: "<API_KEY>",
authDomain: "<PROJECT_ID>.firebaseapp.com",
databaseURL: "https://<DATABASE_NAME>.firebaseio.com",
storageBucket: "<BUCKET>.appspot.com",
};
var secondary = firebase.initializeApp(secondaryAppConfig, "secondary");
var secondaryDatabase = secondary.database();
(this declared in .js file and this file called in index.html)
现在,我想从secondaryAppConfig项目中从Firestore中获取数据。
谢谢。