-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfirebase.js
More file actions
25 lines (20 loc) · 872 Bytes
/
firebase.js
File metadata and controls
25 lines (20 loc) · 872 Bytes
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
import { initializeApp, getApps, getApp } from 'firebase/app';
import { getFirestore } from 'firebase/firestore';
import { getStorage } from 'firebase/storage';
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: 'AIzaSyDh4V2AGPzTOfAmK1ohE67or3jQ975DvQU',
authDomain: 'portfolio-clones.firebaseapp.com',
databaseURL: 'https://portfolio-clones.firebaseio.com',
projectId: 'portfolio-clones',
storageBucket: 'portfolio-clones.appspot.com',
messagingSenderId: '1080338138283',
appId: '1:1080338138283:web:61cc28097cc0047900a3ee',
measurementId: 'G-P4L1DLFXLM',
};
const app = getApps().length < 1 ? initializeApp(firebaseConfig) : getApp();
const db = getFirestore(app);
const storage = getStorage(app);
// Firebase related constants
const fb_posts_url = 'fb-posts';
export { db, storage, fb_posts_url };