Check out a free preview of the full Firebase with React, v2 course:
The "Deploying Cloud Functions" Lesson is part of the full, Firebase with React, v2 course featured in this preview video. Here's what you'd learn in this lesson:

Steve demonstrates how to set up cloud functions, and how to deploy them.

Get Unlimited Access Now

Transcript from the "Deploying Cloud Functions" Lesson

>> Steve Kinney: Let's actually deploy it to the Internet. So we'll do firebase deploy, in this case we'll do --only functions, we don't need to rebuild the entire app and deploy it again. We're only gonna deploy the functions.
>> Steve Kinney: Cool, so it's building that up, and it's gonna push it up to a server.

[00:00:24] In this case, we tell people it's HTTPS on request. So it's whenever somebody makes a request to this endpoint that we're gonna second. And it'll be something like whatever the region is dash the project dash slash, in this case, hello world. Mostly by whatever you called exports dot at the very end there.

[00:00:45] All right, so that is uploading. Let's go ahead and, whoop, let's see. So you can see by default it's node 6. Node 6 is old. And more important than that the fact that it's old is the fact that it doesn't support stuff like the 8608 syntax that we were using before or the spread operator.

[00:01:11] There is a way to change it to use a Node 8 instead, which might be really useful, and that's just basically going into the engines in the package JSON and doing that as well. So we'll try that in a second. I'll actually make that change while we're waiting for it.

>> Steve Kinney: Trying to remember the syntax off the top of my head, think that’ll do the trick.
>> Steve Kinney: All right, so this is called the helloworld function, it's gong to us-central1. One of the things to point out is we'll see for the HTTPS ones how can actually test them locally.

[00:02:07] But I'm not gonna lie to you, the feedback loop for testing cloud functions isn't amazing, right? A lot of times it is deploy, see if it worked, [LAUGH] it didn't, deploy, right? There is a shell, but honestly there's a lot of really great work kind of happening, but it's still not perfect.

[00:02:34] So let's actually grab this helloworld1, I can't click on it directly cuz of that line break. And I will bring it over into Chrome.
>> Steve Kinney: Nope.
>> Steve Kinney: And you can see, there's that response. There's that Hello from Firebase, right? And that was served from a backend API.