Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

firebase setUp

import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/firestore';

const firebaseConfig = { // Have the firebase config here
  apiKey: "",
  authDomain: "",
  projectId: "",
  storageBucket: "",
  messagingSenderId: "",
  appId: "",
  measurementId: ""
};

// Use this to initialize the firebase App
const firebaseApp = firebase.initializeApp(firebaseConfig);

// Use these for db & auth
const db = firebaseApp.firestore();
const auth = firebase.auth();

export { auth, db };
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #firebase #setUp
ADD COMMENT
Topic
Name
7+9 =