Giter Site home page Giter Site logo

tunr_express's Introduction

Tunr 1.0!

We're going to be building Tunr, the worlds #1 music catalog / player (those Spotify haters can't keep up with us).

https://media.giphy.com/media/ku5EcFe4PNGWA/giphy.gif

Part 1 - Database / Schema / Models

In this repo are two files artist_data.sql and songs.sql.

Create the database

Create a postgres database called tunr_db. Make sure to use that exact name, or you'll have trouble later on!

Create a schema

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)

Load the Seed Data

Seed your tables with artist_data.sql and songs.sql.

Set up express app

Define a route with view defined at /. For now it should say Hello World when you visit that url.

Part 2 - Build a RESTful Interface using express

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 in this order:

The Create Feature

Build a feature that creates a new artist in the database.

The Show Feature

Build the show feature for an artist

Further

1 to Many

/artists/1/songs - display all the songs for this artist

Further

The Index Feature

Build the index feature for artists

The Edit Feature

Build a feature that allows a user to edit an existing artist in the database

The Delete Feature

Build a feature that allows users to delete an existing artist from the database.

Further

  • finish the 7 RESTful Routes for songs

Further

  • make routes forsongs that are nested under artists:
    • /artist/1/songs
    • /artist/1/songs/new

tunr_express's People

Contributors

awongh avatar upieez avatar adnacg avatar andrewsunglaekim avatar amaseda avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.