Search code examples
firebasefirebase-realtime-databasegoogle-cloud-functionsfirebase-cli

Initializing firebase CLI Features in an existing Firebase project directory


I am trying to add features "Hosting" into a Firebase project file which has already installed Functions.

So I want to know if I can do this with Firebase Init. or this will erase my existing firebase function. Is there anyway that I can do this without erasing my Firebase Functions.

And, in order to use firebase function, do I have to install Database as well? Or just Functions and Hosting.

Thank you.


Solution

  • The Firebase CLI will not overwrite files unless it asks you to. For each configuration file that it might overwrite, it will ask for confirmation. You can add new products to you project configuration with no problem. You can use each product independently.

    You can verify all this for yourself by initializing a new project folder and testing it out your concerns separately from your existing project folder. As long as you don't deploy anything, no changes will be made to your project hosted in Firebase.