Description
Currently, the application always connects to production Firebase services during development, which causes issues when running with Firebase emulators locally. The application attempts to download videos from the production storage bucket instead of the local emulator.
Problem
- When running with Firebase emulators, the backend still tries to connect to production Firebase Storage
- This results in 404 errors when trying to download videos that exist only in the local emulator
- Developers cannot properly test with local Firebase services
Solution
- Add configuration to detect when running with emulators (
USE_EMULATORS=true)
- Configure Firebase Admin SDK to connect to local emulator services when in development mode
- Add environment variables for emulator host and port configuration
- Update
.env.example with emulator configuration options
Benefits
- Enables proper local development with Firebase emulators
- Prevents accidental calls to production services during development
- Improves development workflow and testing capabilities
Screenshot

Description
Currently, the application always connects to production Firebase services during development, which causes issues when running with Firebase emulators locally. The application attempts to download videos from the production storage bucket instead of the local emulator.
Problem
Solution
USE_EMULATORS=true).env.examplewith emulator configuration optionsBenefits
Screenshot