For your final project, you will need to create a JSON Server API and deploy it to Heroku.
Use this repository as a starting point, as it contains some extra stuff to facilitate with deploying a JSON Server API to Heroku. You can click the green "Code" button and select "Download ZIP". The only file that you'll need to modify is db.json
.
Please read the instructions on that project's README.md for how to run the JSON Server API locally.
To deploy your API to Heroku, follow the instructions below:
- Create a repo on GitHub and push your JSON Server API project up to it.
- Head over to Heroku and create an account.
- Log in and go to the Apps dashboard and select "New" > "Create new app".
- Give your app a name and click the "Create app" button.
- Under "Deployment method", select "Connect to GitHub". Search for your repo and click "Connect".
- Click on "Enable Automatic Deploys". This will ensure that whenever you push changes to your repo, they will be automatically deployed to Heroku.
- Click on "Deploy Branch".
- Once the deployment has finished, click on "Open app" at the top of the page in the upper right corner. You should see a JSON Server welcome page. Now modify the URL path to access your GET API endpoints.