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.
The Get Recommendations function - Google Cloud Tutorial
From the course: Firebase Essential Training
The Get Recommendations function
- [Instructor] The next thing we're going to do now is add a getRecommendations function that our front end can use to load a few restaurants to display before the user actually enters a search into the search box. And for now, this will be pretty simple. All we're going to do is just return the three restaurants that are in our firestore, but down the road, the idea is that we'd be able to incorporate a little bit of machine learning here to recommend restaurants to users based on their location, their reservation history, their ratings and so on. So, let's create this function. We'll start off by going into our functions directory and source. And we're going to create a new directory here called restaurants. And then inside there, we're going to create a file called getRecommendations.js. And here's what our files going to look like. As usual, we're going to start off by importing. Import star as functions from firebase…
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
-
-
-
-
-
-
-
Control access with Cloud Functions1m 42s
-
(Locked)
Set up to run functions locally7m
-
(Locked)
Run Cloud Functions2m 55s
-
(Locked)
The Make a Reservation function, part 18m 44s
-
(Locked)
The Make a Reservation function, part 25m 12s
-
(Locked)
The Submit Review function11m 37s
-
(Locked)
The Cancel Reservation function7m 17s
-
(Locked)
The Get Recommendations function6m 55s
-
(Locked)
The Search Restaurants function6m 20s
-
-
-
-
-