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.

Run Cloud Functions

Run Cloud Functions - Google Cloud Tutorial

From the course: Firebase Essential Training

Start my 1-month free trial

Run Cloud Functions

- [Instructor] So what this will all look like is basically just adding a few new scripts to our project's package.json file. So let's open that file up. And the first script that we're going to add is going to be underneath our functions deploy, and it's going to be called functions watch. Now, recall that in a previous chapter, we installed an npm package called nodemon. What we're going to use that for is to watch the files in our functions' directory, and when they change, to automatically build the functions. So here's what that'll look like. We're going to say nodemon dash dash watch, and then we're going to put in the directory that we want it to watch, which will be our functions directory. And then we're going to say dash dash ignore, because we don't want it to watch our build directory. 'Cause otherwise it would just kind of run in an infinite loop with what we're doing. So we want to say ignore ./functions/build,…

Contents