Google is committed to advancing racial equity for Black communities. See how.

Learning Cloud Functions for Firebase (video series)

If you're interested in learning about Cloud Functions for Firebase but prefer your education in a more cinematic format, this series of videos from the Firebase YouTube channel might be of interest to you.

Cloud Functions for Firebase lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests. Watch this video to get started writing functions using TypeScript and deploying them with the Firebase CLI.

If you’re going to write code for Cloud Functions, you definitely need to know about how promises work. Nearly all the functions you write will use promises, and, if you don’t do it correctly, your code may fail in mysterious ways. In this tutorial, you’ll learn the basics of using promises in your HTTP functions.

How do you correctly terminate a background function? You must return a promise that becomes fulfilled or rejected when all the pending work in that function is complete. Let's see what that looks like with a Firestore trigger.

How do you perform multiple items of asynchronous work in Cloud Functions? In this video, you'll see how to chain work sequentially with promises, and also how to manage work in parallel with Promise.all(). These are the building blocks you'll need to write advanced code with Cloud Functions for Firebase.

Did you know that async/await syntax can make your TypeScript (and ECMAScript 2017) easier to read and write? Check out this first of two tutorials to learn async/await for use with Cloud Functions.

Using async/await syntax with Cloud Functions for Firebase can make your TypeScript and ECMAScript 2017 code easier to read and write. In this part 2 video, Doug shows how to convert some functions that use promises to use async/await instead.

Cloud Functions allows you to write code that responds to changes in Realtime Database. This video explains how these triggers work on the backend and focuses on the onCreate event handler, which triggers when new data is created in the database.

The first video in our database trigger mini-series showed how to implement a database trigger using OnCreate, which triggers on new documents. But what if you want to implement triggers on existing documents that are modified? Find out in this video covering the OnUpdate trigger.

In this video, lean how an onDelete trigger works with Cloud Functions for Firebase, and how to handle race conditions.