Hola hola,
TLDR
RetrievePROJECT ID
by running:
firebase projects:list
.
Once you have that id, run the following command:
firebase use {PROJECT ID}
Problem
As you work with projects, you'll notice that you will often have adev
and aprod
database instance.
You don't want to test new features on live user data so you create aduplicate of yourprod
database.
Now that you have two projects, you're gonna' need to switch between them as you test and deploy your Cloud Cunctions (CF).
Imagine the following scenario:
- New CF feature A is being developed, tested, and deployed to the
dev
database/CF instances. - Feature A is now ready to release to our Users.
- We need to now deploy the feature A updates to our
prod
instances.
Solution
At this point, I will assume that you have installedFirebase CLI.
These projects have a uniquePROJECT ID
that we use in our commands to switch projects.
First, we want to make get thatPROJECT ID
. Do that by running:
firebase projects:list
.
Once you have that id, run the following command:
firebase use {PROJECT ID}
If successful, you should see a message like:
Now using project {PROJECT_ID}
I hope that's helpful to some.
-Matt
Top comments(3)

Thanks!
For further actions, you may consider blocking this person and/orreporting abuse