We can remove the test insertion from Finder.jsx. Here's what we're going to be making:
Figure 15.6 - Restaurant finder
To accomplish this, we're going to be using the Yelp API. First of all, you'll need to go to https://www.yelp.com/developers and sign up for a Yelp Fusion API key. Once you have it, we're going to store it in a new .env file in a new api directory.
The Yelp Fusion API is not available in all countries, so if you cannot access it, please look in Chapter-15 folder on GitHub for an alternative API usage example.
The Yelp API is a REST API and doesn't allow connections from frontend JavaScript in order to protect your keys. So, like our recipe book, we're going to create a small API layer to handle our requests. Unlike our recipe book, this will be fairly simple, so we're not going to use Express. Let's look at the steps:
- At the root level of your project, we're going to install a few...