manifold/web/lib/firebase/init.ts

9 lines
311 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'
import { FIREBASE_CONFIG } from '../../../common/access'
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)