Installation

import { initializeApp } from "firebase/app";
import { getAuth } from "firebase/auth";
import { getFirestore } from "firebase/firestore";

//import get storage to run cloud storage
import { getStorage } from "firebase/storage";

const firebaseConfig = {
  apiKey: "xxx",
  authDomain: "xxx",
  projectId: "xxx",
  messagingSenderId: "xxx",
  appId: "xxx",
  measurementId: "xxx"
  
  // make sure to put storagebucket url chere
  storageBucket: "yyy.appspot.com",
  };

const app = initializeApp(firebaseConfig);
const auth = getAuth();
const db = getFirestore(app);
const storage = getStorage(app);

// export storage
export { auth, db, app, storage };

Last updated

Was this helpful?