// config/firebase.js
// const admin = require("firebase-admin");
// const serviceAccount = require("../../firebase-service-account.json.json");
// admin.initializeApp({
//   credential: admin.credential.cert(serviceAccount),
// });
// module.exports = admin;



// config/firebase.js
// const admin = require("firebase-admin");

// if (!admin.apps.length) {
//   admin.initializeApp({
//     credential: admin.credential.cert({
//       projectId: process.env.FIREBASE_PROJECT_ID,
//       clientEmail: process.env.FIREBASE_CLIENT_EMAIL,
//       privateKey: process.env.FIREBASE_PRIVATE_KEY.replace(/\\n/g, "\n"),
//     }),
//   });
// }

// module.exports = admin;

