Deploying the frontend
You can deploy your frontend to Heroku as well, but we will now use AWS Amplify for the deployment.
First, we have to change our REST API URL. Open your frontend project with Visual Studio Code (VS Code) and open the constants.js
file in the editor. Change the SERVER_URL
constant to match your backend's URL, as follows, and save the changes:
export const SERVER_URL = 'https://carbackend.herokuapp.com/';
Then, push your code to GitHub and follow the next steps:
- Log in to the Amplify console (https://console.aws.amazon.com/amplify/home).
- Press the Get started button under Amplify Hosting, as illustrated in the following screenshot:
- Select GitHub and press the Continue button, as illustrated in the following screenshot. First, you have to link your GitHub account to Amplify:
- Next, select...