Just run the app normally - it uses serviceAccountKey.json for Firebase:
# Backend
cd Backend
npm start
# Frontend
cd Frontend
npm run devcd Backend
npm run setup-deployThis will:
- Update your
.envfile with Firebase credentials fromserviceAccountKey.json - Set
NODE_ENV=production
Backend .env: Change MONGO_URI to your production database:
MONGO_URI=mongodb+srv://user:password@cluster.mongodb.net/genimeds
Frontend .env: Change VITE_API_BASE_URL to your deployed backend:
VITE_API_BASE_URL=https://your-backend-url.com
- Backend: Deploy with your updated
.envfile - Frontend: Deploy with your updated
.envfile
When you want to go back to local development:
cd Backend
npm run setup-localThis resets everything back to use the service account file locally.
- Local: Uses
serviceAccountKey.json(no setup needed) - Deploy: Run
npm run setup-deploy, update URLs, deploy - Back to Local: Run
npm run setup-local
Single .env file, works everywhere! 🎉