File size: 980 Bytes
cc276cc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | // A separate Firebase initialization for the Aether feed feature.
import { initializeApp, getApp, getApps, FirebaseApp } from "firebase/app";
import { getDatabase, Database } from "firebase/database";
const aetherFirebaseConfig = {
apiKey: "AIzaSyBffi_di_gpFA0rhhg6BYF1IiA1mSZ5SMc",
authDomain: "minitalk-idpq6.firebaseapp.com",
databaseURL: "https://minitalk-idpq6-default-rtdb.europe-west1.firebasedatabase.app",
projectId: "minitalk-idpq6",
storageBucket: "minitalk-idpq6.firebasestorage.app",
messagingSenderId: "250201096501",
appId: "1:250201096501:web:011849151cb98ab2b44c7c",
measurementId: "G-KENKBMR2YQ"
};
// Initialize the secondary Firebase app with a unique name
let aetherApp: FirebaseApp;
if (!getApps().some(app => app.name === 'aetherApp')) {
aetherApp = initializeApp(aetherFirebaseConfig, 'aetherApp');
} else {
aetherApp = getApp('aetherApp');
}
const aetherDb: Database = getDatabase(aetherApp);
export { aetherApp, aetherDb };
|