In this workshop, you'll be provided this GitHub repo with details for a full operational CRUD API that uses Express.JS, PostgreSQL, and other technologies that you've been trained on.
Install Packages
npm i
Initialize Database
createdb fitness-dev
Start Server
npm run start:dev
Currently, test suites must be run separately. I have not yet fixed this.
npm run test:watch db.spec
npm run test:watch api.spec
To edit the documentation, edit the FitnessTrackr API Documentation.md
file, then copy the markdown content and use https://markdowntohtml.com/ to convert to html. Paste the html into public/index.html
in the div
with id="doc-html"
.
Begin by seeding the database with the provided seed.js
file. You can run this file with the following command:
`npm run seed`
Using Postman to test your API, create a GET route that returns all routines and activies available in the database. There shouldn't be any errors at this point.
Continuing to use Postman to test your API, you will encounter an error when trying to GET a single routine by ID. Fix this error.
You will need to configure authorization in Postman to test this route. After authorizing, you will encounter an error when trying to POST a new routine. Fix this error.
In this exercise, you will update a record using Postman. There should be no errors if your code is correct.
Remove a record from the "rountine_activities" table. You will encounter an error. Fix this error.
Using ReactJS or HTML / CSS / JS, create a frontend that allows a user to interact with the API.