Skip to content

Latest commit

 

History

History
65 lines (41 loc) · 1.28 KB

README.md

File metadata and controls

65 lines (41 loc) · 1.28 KB

api-solo-project

This was created during my time as a student at Code Chrysalis

Summer Olympics 2008 Winners API

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.

Frontend Screenshot


Getting Started

Postgres

You will need Postgres installed.

Create a database for this project by running:

    echo "CREATE DATABASE olympics;" | psql

Installing Dependencies and Startup

To install dependencies:

    yarn

To set up the database, run migrations and seeds:

    yarn migrate
    yarn seed

To start the app:

    nodemon .

To roll back migrations:

    yarn rollback

API endpoints

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