Blake
Blake

Reputation: 177

How to merge two different firebase projects?

Background:

I have a Javascript-React website up and running on a firebase project A. However, the rest of my company's backend code is deployed in another firebase project B.

Question:

How do I "merge" my website or make changes so that my React website shares the resources of the main firebase project? Like the cloud functions and the database should be from the main firebase project(B) and not project A.

If I copy the exiting cloud functions on my React project, to the backend code, link my website to the backend database, and make the website call the newly added cloud functions on the backend code, will that work? or is this a messy method?

Upvotes: 0

Views: 1583

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598797

There is no way to merge Firebase projects.

But you should be able to change the configuration for the web app to point to project B, or to change the configuration for your backend code to project A.

If you follow the documentation for adding Firebase to a new app or adding Firebase to a new backend you should end up with both code-bases talking to the same backend.

If you run into trouble while doing so, post back with details of where you got stuck and we can probably help more concretely.

Upvotes: 1

Related Questions