Skip to content

Meschreiber/1702-seq-ex-review

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cats and Owners - a Sequelize/Express Review

(by Julie Busch!)

Start it up

  • $ createdb catstravaganza (first time setup only)
  • $ npm install
  • $ npm start

Check out those routes!

  • You'll need to use the post route a few times or just add info directly in Postico because there is no seed file. But you're here to learn about routes anyway, so I don't feel bad about making you do that.
  • I highly recommend downloading the Postman tool for testing routes
    • You can use Postman to send all types of requests to your localhost and see the responses

There's a review video featuring this repo here!

Try adding your own methods and routes!

  • See if you can use the methods given to you by the "Owner has many cats" relation!
    • Create an owner instance method called adopt that is passed the id of a cat and then associates that cat with its new owner! (Have the owner adopt a random cat if no id is passed in.)
    • Then make a PUT route in the owner routes that will allow an owner to adopt a cat!
    • You can see a solution to this in the adoption-solution branch!

That's it! Happy Studying!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%