Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to switch between two firebase projects in cloud functions? [duplicate]

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.

like image 609
Alexander Khitev Avatar asked Jul 13 '17 10:07

Alexander Khitev


People also ask

How do I duplicate a project in Firebase?

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.

Can you connect more than one Firebase project to your Android app?

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.

Can a Firebase project have multiple apps?

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).


1 Answers

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.

like image 84
Doug Stevenson Avatar answered Sep 30 '22 13:09

Doug Stevenson