Skip to content

Instantly share code, notes, and snippets.

@ChazAttack73
Created January 26, 2016 07:24
Show Gist options
  • Save ChazAttack73/64f291312406cfa8b03f to your computer and use it in GitHub Desktop.
Save ChazAttack73/64f291312406cfa8b03f to your computer and use it in GitHub Desktop.
Assignment details for adding pg-promise to Articles Products and Express

##Adding a PSQL Database to Articles Products and Express

##Goal You are going to make your first application with a real database, by adding a PSQL database to your Articles Products and Express, Oh My! project.

##Let's break it down

  1. Build a UML schema for your products and your arcitles. What columns will you need? What is the data type of each column? Hint: First you will white board it. Get your UML approved by an instructor or a TA

  2. After your UML has been appproved by an instructor or a TA, build and test the queries in PSQL CLI. Hint: You will need to make all the basic CRUD operations for both products, articles, and possibly authors.

  3. When you have your queries working add the query to pg-promise and serve up the JSON data to your Jade templates. Your application should work exactly like it did before, but now with PSQL.

##Hints

  • Test your queries and PSQL statements out in the PSQL CLI before inserting them into your application. It will be easier to troubleshoot your application.

##Helpful Links Articles Products and Express, Oh My!

Bluebird Docs

pg-promise Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment