Step 6

Open the index.js file in younote-app-starter folder.

Update the endpoint URL which we have provided to axios.get function:

- let response = await axios.get(`http://localhost:4567/api/notes?author=${username}`);
+ let response = await axios.get(`${API_URL}/api/notes?author=${username}`);

Create a variable API_URL and give it the URL of your Heroku app:

const API_URL = "https://cs280-younote-api.herokuapp.com";

Restart the frontend!

Your frontend app is now connected to the deployed YouNote API.

This repository contains the updated YouNote App.