← Firebase learning pathFirebase · Module 7 of 10
Cloud Functions
Run backend code that responds to events and HTTP calls.
📖 Key ideas
- Functions run Node.js (or Python) on Google's servers.
- HTTP functions: onRequest; callable functions: onCall.
- Triggers: Firestore writes, Auth user created, Storage uploads, schedules.
- Deploy: firebase deploy --only functions.
- 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