3

I deployed a code to Firebase functions. Now I need the same code for another project. But I lost the code in my local machine.

Is there anyway to retrieve the code from Firebase console?

Renaud Tarnec
  • 79,263
  • 10
  • 95
  • 121
hasn
  • 749
  • 6
  • 21

1 Answers1

10

Yes you can find your Cloud Functions code on the Google Cloud Platform console (not the Firebase console).

  1. Go to https://console.cloud.google.com/functions
  2. (If necessary, switch to the desired project)
  3. Open the "Function details" screen by clicking on the Function name
  4. Click on the "Source" tab (just below the "version" drop-down list)

You can either copy/paste the code from the text area or use the "Download zip" button on the top-right corner of the screen.

Renaud Tarnec
  • 79,263
  • 10
  • 95
  • 121
  • 2
    I love you so much! :D Thank you! – hasn Sep 27 '18 at 10:55
  • 1
    this was really helpful – Aris Ngoy Apr 23 '19 at 19:09
  • This seems to no longer be the case. There is no way to see the function details. Is there a new way to find the existing functions? I no longer have the function script that was uploaded and I would like to make changes to one function. – Jon Tinsman Feb 09 '21 at 19:43
  • @JonTinsman For what I can see it is still the case. Note that it's not on the Firebase console, but on the **Google Cloud Platfom** Console https://console.cloud.google.com/functions – Renaud Tarnec Feb 09 '21 at 19:56
  • @RenaudTarnec, after downloading the zip file, how can I deploy it in another project ? – Istiaque Ahmed Oct 17 '22 at 22:01