// config.js
let config = {
apiKey: "***********",
authDomain: "***********",
databaseURL: "***********",
projectId: "***********",
storageBucket: "***********",
messagingSenderId: "***********",
appId: "",
measurementId: "***********"
}
export default config;
// home.js
import config from '../utils/config'; // import my config file
let db;
setTimeout(() => {
if (!firebase.apps.length) {
try {
firebase.initializeApp(config)
} catch (err) {
console.log(err)
}
}
db = firebase.firestore();
}, 1000)