Skip to content

Commit

Permalink
Commented the emulators config
Browse files Browse the repository at this point in the history
  • Loading branch information
jvJUCA committed Jun 6, 2024
1 parent 5f7d174 commit 5eabbc7
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions src/firebase/index.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
import { initializeApp } from 'firebase/app'
import { getAnalytics } from 'firebase/analytics'
import {
getAuth,
connectAuthEmulator,
} from 'firebase/auth'
import {
getFirestore,
connectFirestoreEmulator,
} from 'firebase/firestore'
import {
getFunctions,
connectFunctionsEmulator,
} from 'firebase/functions'
import {
getStorage,
connectStorageEmulator,
} from 'firebase/storage'
import { getAuth, connectAuthEmulator } from 'firebase/auth'
import { getFirestore, connectFirestoreEmulator } from 'firebase/firestore'
import { getFunctions, connectFunctionsEmulator } from 'firebase/functions'
import { getStorage, connectStorageEmulator } from 'firebase/storage'

const firebaseConfig = {
apiKey: process.env.VUE_APP_FIREBASE_API_KEY,
Expand All @@ -36,11 +24,11 @@ const storage = getStorage(firebaseApp, `gs://${firebaseConfig.storageBucket}`)

// Emulators if running locally

if (process.env.NODE_ENV === 'development') {
connectFirestoreEmulator(db, 'localhost', 8081)
connectAuthEmulator(auth, 'http://localhost:9099')
connectFunctionsEmulator(fbFunctions, 'localhost', 5001)
connectStorageEmulator(storage, '127.0.0.1', 9199)
}
// if (process.env.NODE_ENV === 'development') {
// connectFirestoreEmulator(db, 'localhost', 8081)
// connectAuthEmulator(auth, 'http://localhost:9099')
// connectFunctionsEmulator(fbFunctions, 'localhost', 5001)
// connectStorageEmulator(storage, '127.0.0.1', 9199)
// }

export { auth, db, analytics, fbFunctions, storage }

0 comments on commit 5eabbc7

Please sign in to comment.