How to backend + postgres

Set up an npm project

npm init -y

Set the database

createdb fullstack-pets
touch schema.sql
touch seed.sql

Put stuff in schema.sql and in seed.sql

  • find the nouns, create tables for each
  • describe the columns for each kind of thing

owners

1 - chris 2 - aylor

pets

1 - oakley 2 - milla 3 - dexter 4 - hank 5 - seymour

owners_pets

1 1 1 2 2 3 2 4 2 5 1 3