How to switch between two firebase projects in cloud functions?

Alexander Khitev picture Alexander Khitev · Jul 13, 2017 · Viewed 10.8k times · Source

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.

Answer

Doug Stevenson picture Doug Stevenson · Jul 13, 2017

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.