Introduction to JSON Server

Before you start, please create a GitHub account and a Heroku account.

Use this repository as a starting point, as it contains some extra stuff to facilitate with deploying a JSON Server API to Heroku. The only file that you'll need to modify is db.json.

Please read the instructions on the README for how to run the JSON Server API locally.

To deploy your API to Heroku, follow the instructions below:

  1. Log into GitHub and click on the "Fork" button on this repository. Next, click on the "Create fork" button.
  2. Log in to Heroku and go to the Apps dashboard and select "New" > "Create new app".
  3. Give your app a name and click the "Create app" button.
  4. Under "Deployment method", select "Connect to GitHub". Search for your forked repository and click "Connect".
  5. Click on "Enable Automatic Deploys". This will ensure that whenever you make changes to your forked repository, they will be automatically deployed to Heroku.
  6. Click on "Deploy Branch".
  7. 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.