mirror of
https://github.com/turbomaster95/coderrrrr.git
synced 2025-05-11 04:30:14 +00:00
12 lines
327 B
TypeScript
12 lines
327 B
TypeScript
// lib/firebase.ts
|
|
import { initializeApp, cert } from "firebase-admin/app";
|
|
import { getFirestore } from "firebase-admin/firestore";
|
|
|
|
const serviceAccount = JSON.parse(process.env.FIREBASE_SERVICE_ACCOUNT_KEY!);
|
|
|
|
const app = initializeApp({
|
|
credential: cert(serviceAccount),
|
|
});
|
|
|
|
export const firestore = getFirestore(app);
|