## 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](https://www.youtube.com/firebase) channel might be of interest to you.  

### [Getting Started with Cloud Functions for Firebase using TypeScript](https://www.youtube.com/watch?v=DYfP-UIKxH0&t=6s&list=PLl-K7zZEsYLkPZHe41m4jfAxUi0JjLgSM&index=2)

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.  
[Watch on YouTube](https://www.youtube.com/watch?v=DYfP-UIKxH0&t=6s&list=PLl-K7zZEsYLkPZHe41m4jfAxUi0JjLgSM&index=2)  

### [Learn JavaScript Promises (Pt.1) with HTTP Triggers in Cloud Functions](https://www.youtube.com/watch?v=7IkUgCLr5oA&t=1s&list=PLl-K7zZEsYLkPZHe41m4jfAxUi0JjLgSM&index=3)

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.  
[Watch on YouTube](https://www.youtube.com/watch?v=7IkUgCLr5oA&t=1s&list=PLl-K7zZEsYLkPZHe41m4jfAxUi0JjLgSM&index=3)  

### [Learn JavaScript Promises (Pt. 2) with a Firestore Trigger in Cloud Functions](https://www.youtube.com/watch?v=652XeeKNHSk&t=2s&list=PLl-K7zZEsYLkPZHe41m4jfAxUi0JjLgSM&index=4)

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.  
[Watch on YouTube](https://www.youtube.com/watch?v=652XeeKNHSk&t=2s&list=PLl-K7zZEsYLkPZHe41m4jfAxUi0JjLgSM&index=4)  

### [Learn JavaScript Promises (Pt. 3) for sequential and parallel work in Cloud Functions](https://www.youtube.com/watch?v=d9GrysWH1Lc&t=0s&list=PLl-K7zZEsYLkPZHe41m4jfAxUi0JjLgSM&index=5)

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.  
[Watch on YouTube](https://www.youtube.com/watch?v=d9GrysWH1Lc&t=0s&list=PLl-K7zZEsYLkPZHe41m4jfAxUi0JjLgSM&index=5)  

### [How does async/await work with TypeScript and ECMAScript 2017?](https://www.youtube.com/watch?v=TCYhr_UMZkI&index=2&list=PLl-K7zZEsYLnJVX_0zbKytptZGugPIbJR)

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.  
[Watch on YouTube](https://www.youtube.com/watch?v=TCYhr_UMZkI&index=2&list=PLl-K7zZEsYLnJVX_0zbKytptZGugPIbJR)  

### [Use async/await with TypeScript in Cloud Functions for Firebase](https://www.youtube.com/watch?v=Jr7pDZ1RAUg&t=0s&list=PLl-K7zZEsYLnJVX_0zbKytptZGugPIbJR&index=2)

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.


[Watch on YouTube](https://www.youtube.com/watch?v=Jr7pDZ1RAUg&t=0s&list=PLl-K7zZEsYLnJVX_0zbKytptZGugPIbJR&index=2)  

### [Realtime Database triggers (pt. 1) with Cloud Functions for Firebase](https://www.youtube.com/watch?v=DglTSNEdl0UI&index=2&list=PLl-K7zZEsYLnJVX_0zbKytptZGugPIbJR)

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.  
[Watch on YouTube](https://www.youtube.com/watch?v=DglTSNEdl0UI&index=2&list=PLl-K7zZEsYLnJVX_0zbKytptZGugPIbJR)  

### [Realtime Database triggers (pt.2) with Cloud Functions for Firebase](https://www.youtube.com/watch?v=Bdm7QNwSHOg&t=0s&list=PLl-K7zZEsYLnJVX_0zbKytptZGugPIbJR&index=2)

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.


[Watch on YouTube](https://www.youtube.com/watch?v=Bdm7QNwSHOg&t=0s&list=PLl-K7zZEsYLnJVX_0zbKytptZGugPIbJR&index=2)  

### [Realtime Database triggers (pt. 3) with Cloud Functions for Firebase](https://www.youtube.com/watch?v=TPKA88_FmkA&index=2&list=PLl-K7zZEsYLnJVX_0zbKytptZGugPIbJR)

In this video, lean how an `onDelete` trigger works with Cloud Functions for Firebase, and how to handle race conditions.  
[Watch on YouTube](https://www.youtube.com/watch?v=TPKA88_FmkA&index=2&list=PLl-K7zZEsYLnJVX_0zbKytptZGugPIbJR)