← Firebase learning path
Firebase · Module 7 of 10

Cloud Functions

Run backend code that responds to events and HTTP calls.

📖 Key ideas

  1. Functions run Node.js (or Python) on Google's servers.
  2. HTTP functions: onRequest; callable functions: onCall.
  3. Triggers: Firestore writes, Auth user created, Storage uploads, schedules.
  4. Deploy: firebase deploy --only functions.
  5. Use them for trusted logic: payments, emails, admin tasks.
💡 Real-life example: Cloud Functions are staff who wake up only when the doorbell (event) rings, then go back to sleep.
onCallCallable function with auth context
onRequestHTTP endpoint function
TriggerEvent that runs a function
Cold startDelay when a new instance starts