import { cert , initializeApp , ServiceAccount } from 'firebase-admin/app' ; import { getFirestore } from 'firebase-admin/firestore' ; import serviceAccount from '../serviceAccount.json' ; const credential = cert ( serviceAccount as ServiceAccount ) ; initializeApp ( { credential } ) ; const firestore = getFirestore ( ) ; export { firestore } ;