Recall & Review
beginner
What is the first step to set up Firebase Cloud Functions?
Initialize your Firebase project locally using
firebase init functions. This sets up the necessary files and folders for Cloud Functions.Click to reveal answer
beginner
Which file contains the main code for Firebase Cloud Functions?
The
index.js or index.ts file inside the functions folder contains the main Cloud Functions code.Click to reveal answer
beginner
How do you deploy your Firebase Cloud Functions to the cloud?
Run
firebase deploy --only functions in your terminal to upload and activate your Cloud Functions in Firebase.Click to reveal answer
intermediate
What is the purpose of the
package.json file in Cloud Functions setup?It manages dependencies and scripts for your Cloud Functions project, like which Node.js packages your functions need.
Click to reveal answer
intermediate
Why should you test Cloud Functions locally before deploying?
Testing locally helps catch errors early and ensures your functions work as expected, saving time and avoiding deployment issues.
Click to reveal answer
Which command initializes Cloud Functions in a Firebase project?
✗ Incorrect
The command
firebase init functions sets up the Cloud Functions environment locally.Where do you write your Firebase Cloud Functions code?
✗ Incorrect
Cloud Functions code is written in
functions/index.js or index.ts.What does
firebase deploy --only functions do?✗ Incorrect
This command deploys only the Cloud Functions part of your Firebase project.
Which file lists the Node.js packages your Cloud Functions need?
✗ Incorrect
package.json manages dependencies for your Cloud Functions.Why is local testing of Cloud Functions recommended?
✗ Incorrect
Local testing helps find and fix errors early, making deployment smoother.
Describe the basic steps to set up and deploy a Firebase Cloud Function.
Think about starting, coding, preparing, and sending your function to the cloud.
You got /4 concepts.
Explain why managing dependencies with package.json is important in Cloud Functions setup.
Consider what happens if your function needs a library that isn't installed.
You got /4 concepts.