manifold/web/lib/firebase/init.ts

9 lines
319 B
TypeScript
Raw Normal View History

2021-12-09 22:05:55 +00:00
import { getFirestore } from '@firebase/firestore'
import { initializeApp, getApps, getApp } from 'firebase/app'
2022-03-08 04:52:10 +00:00
import { FIREBASE_CONFIG } from '../../../common/envs/constants'
2021-12-08 16:42:19 +00:00
// Initialize Firebase
export const app = getApps().length ? getApp() : initializeApp(FIREBASE_CONFIG)
2021-12-09 22:05:55 +00:00
export const db = getFirestore(app)