0
0
Firebasecloud~5 mins

Cloud Functions setup in Firebase - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Afirebase create functions
Bfirebase start functions
Cfirebase deploy functions
Dfirebase init functions
Where do you write your Firebase Cloud Functions code?
AIn the <code>functions/index.js</code> file
BIn the <code>public/index.html</code> file
CIn the Firebase console only
DIn the <code>database.rules.json</code> file
What does firebase deploy --only functions do?
AStarts the local emulator
BUploads only Cloud Functions to Firebase
CDeletes all Cloud Functions
DDeploys the entire Firebase project
Which file lists the Node.js packages your Cloud Functions need?
Apackage.json
Bfirebase.json
Cindex.js
Dfunctions.json
Why is local testing of Cloud Functions recommended?
ATo deploy faster
BTo avoid writing code
CTo catch errors before deployment
DTo skip authentication
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.