We're going to be building Tunr, the worlds #1 music catalog / player (those Spotify haters can't keep up with us).
In this repo are two files artist_data.sql
and songs.sql
.
Create a postgres database called tunr_db
. Make sure to use that exact
name, or you'll have trouble later on!
Inside the db folder, create a tables.sql
file, and then load it into your
tunr_db
database.
Here's what our data model looks like:
Artists
column name | type |
---|---|
id | primary key (int) |
name | text |
photo_url | text |
nationality | text |
Songs
column name | type |
---|---|
id | primary key (int) |
title | text |
album | text |
preview_link | text |
artwork | text |
artist_id | foreign key (int) |
Seed your tables with artist_data.sql
and songs.sql
.
Define a route with view defined at /
. For now it should say Hello World
when you visit that url.
Make sure to commit after completing each feature.
Don't move to the next feature without first finishing a feature.
URL | HTTP Verb | Action | Purpose |
---|---|---|---|
/artists/ | GET | index | See all the artists |
/artists/new | GET | new | Display the form for a single artist |
/artists | POST | create | Create a new artist |
/artists/:id | GET | show | See a single artist |
/artists/:id/edit | GET | edit | Display the form for editing a single artist |
/artists/:id | PATCH/PUT | update | Update a artist |
/artists/:id | DELETE | destroy | Remove a artist |
Build a feature that creates a new artist
in the database.
Build the show feature for an artist
/artists/1/songs
- display all the songs for this artist
Build the index feature for artists
Build a feature that allows a user to edit an existing artist
in the database
Build a feature that allows users to delete an existing artist
from the database.
- finish the 7 RESTful Routes for
songs
- make routes for
songs
that are nested under artists:/artist/1/songs
/artist/1/songs/new