Unable to display deployed cloud function in firebase console

I am trying to deploy a cloud function in firebase, but I am confused between the command line and the firebase functions console-> project->. Because the command prompt window is deployed successfully, but there are no functions in the function.

Below are the steps to deploy the process.

  • Download a sample function and place it on drive c with the name of the AddMessage folder.
  • Run the command line and run the command "npm install -g firebase-tools".
  • After that, I ran the "firebase login" command and the result: you are already logged in via email.
  • After that, I ran the “initbbbbbbase functions” command and gave me a list of projects, and I selected the project with enter. And the answer to some question that is in the image.

    enter image description here 5. After that, I ran the command "firebase deploy -only functions" and gave the result below. enter image description here

After that I visited https://console.firebase.google.com/ to check the selected project function →, but I ended up below the screen. enter image description here

+4
source share
1 answer

Firebase only expands the functions that are exported, so you need to make sure that the function you want to deploy is exported to your file index.js:

exports.yourFunction = functions.https.onRequest((req, res) => {
// Your enter code here
}
+1
source

Source: https://habr.com/ru/post/1680288/


All Articles