-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfirebase.ts
27 lines (23 loc) · 980 Bytes
/
firebase.ts
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
26
27
import { initializeApp, getApp, getApps } from 'firebase/app';
import { getFirestore } from 'firebase/firestore';
import { getAuth, GoogleAuthProvider } from 'firebase/auth';
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:63dc72d5805d446700a3ee',
measurementId: 'G-MRHL2LBF5D',
};
// Initialize Firebase
const app = !getApps().length ? initializeApp(firebaseConfig) : getApp();
const db = getFirestore(app);
const auth = getAuth(app);
const authProviderGoogle = new GoogleAuthProvider();
// Firebase-related constants
const users_url = 'users';
const chats_url = 'wa-chats';
const messages_url = 'messages';
export { db, auth, authProviderGoogle, users_url, chats_url, messages_url };