Replies: 1 comment
-
Use initializeApp for multiple Firebase databases.
const primaryApp = firebase.initializeApp(primaryConfig);
const primaryDatabase = firebase.database(primaryApp); 2: Initialize Second Database with databaseId const secondaryConfig = { ...primaryConfig, databaseId: "your-database-id" };
const secondaryApp = firebase.initializeApp(secondaryConfig, "secondary");
const secondaryDatabase = firebase.database(secondaryApp); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm looking how to connect to another database on the same project using the databaseId with the firebase sdk?
I haven't found anything in the documentation.
thanks a lot
Quentin
Beta Was this translation helpful? Give feedback.
All reactions