I have two Firebase projects one for the development of another for production. How do I switch between them in the root branch with cloud functions? Since for example I'm developing a new function and I want to do deploy only on the firebase development project and check how it works before doing deploy in the firebase production project.
There is currently no way (neither through the Console or through an API) to create a project that is a clone of another project. At the moment you will have to re-create the config data in the new project manually.
However, when you want to access multiple projects from a single application, you'll need a distinct Firebase application object to reference each one individually. It's up to you to initialize these other instances.
A Firebase project can have one or more Firebase Apps registered to it (for example, both the iOS and Android versions of an app, or both the free and paid versions of an app).
Please read the documentation for the Firebase CLI. In particular, you'll want to learn about the firebase use
command to create aliases for your projects and switch between them for deployment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With