From the course: Firebase Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Write Cloud Functions in ES6+ syntax - Google Cloud Tutorial
From the course: Firebase Essential Training
Write Cloud Functions in ES6+ syntax
- [Instructor] Now, you may have noticed when we looked at the hello world example function provided for us by Firebase that the code here was written in older JavaScript syntax, that is, using require and module exports. And that's because by default, cloud functions don't currently support ES6 syntax and beyond, similar to Node.JS. Now this older syntax also extends into things like async, await, and other things we're only allowed to do with later versions of JavaScript, which cloud functions will complain about if we try and use. And this is a little bit annoying, since, well, the rest of our application is written in modern JavaScript. So you might be wondering if there's a way to write our functions using ES6+ syntax instead of being stuck writing our functions with older JavaScript. Well, fortunately the answer here is a resounding yes. Now the first way to do this would be to use TypeScript. If you remember when…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
What are Cloud Functions?2m
-
(Locked)
Add Cloud Functions to a project4m 45s
-
(Locked)
Write Cloud Functions in ES6+ syntax10m 33s
-
(Locked)
Build an email verification flow3m 9s
-
(Locked)
Modify Firestore security rules1m 8s
-
(Locked)
Create temporary users10m 57s
-
(Locked)
Verify temporary users2m 44s
-
(Locked)
Send emails with nodemailer7m 33s
-
(Locked)
Send emails from Cloud Functions58s
-
(Locked)
Verify users with Cloud Functions6m 11s
-
(Locked)
Demonstrate the verification flow3m 20s
-
(Locked)
Cloud Functions pricing1m 41s
-
-
-
-
-
-