manifold/web/lib/firebase/init.ts
2022-03-07 20:52:10 -08:00

9 lines
319 B
TypeScript

import { getFirestore } from '@firebase/firestore'
import { initializeApp, getApps, getApp } from 'firebase/app'
import { FIREBASE_CONFIG } from '../../../common/envs/constants'
// Initialize Firebase
export const app = getApps().length ? getApp() : initializeApp(FIREBASE_CONFIG)
export const db = getFirestore(app)