This was created during my time as a student at Code Chrysalis
This is a CRUD API using Postgres, Knex and RESTful principles. It contains the medal winners from the 2008 Summer Olympics. It is displayed with an html frontend.
You will need Postgres installed.
Create a database for this project by running:
echo "CREATE DATABASE olympics;" | psqlTo install dependencies:
yarnTo set up the database, run migrations and seeds:
yarn migrate yarn seedTo start the app:
nodemon .To roll back migrations:
yarn rollback| endpoint | method | result |
|---|---|---|
api/winners |
GET | Shows all winners |
api/winners/countryCode |
GET | Shows all winners from a specific country |
index.html |
POST | this form will add a winner |
