This server is intended to be used with the Veterinarian front-end projects.
This server is created using the json-server
NPM package.
Some of the data came from this Kaggle dataset.
The following resources exist:
- Pets:
/api/pets
- Owners:
/api/owners
- Owners/Pets:
/api/owners_pets
- Employees:
/api/employees
- Clone the repository.
npm install
npm start
- Install the Heroku CLI.
- Login to your Heroku CLI with
heroku login
. heroku create
git push heroku main
If students will be modifying the data from this API, it is a good idea to regularly reset the database. You can do so by using the Heroku Scheduler.
From the command line, run the following command:
heroku addons:create scheduler:standard
Then, run the following command:
heroku addons:open scheduler
Finally, add a new job. You can set the npm run reset-db
command to run as often as you like.