This week we aimed to learn about databases, specifically SQL, as well as advancing our Node knowledge.
- Designing and documenting a database schema
- Create a relational database
- Read and write SQL queries
- Avoid SQL injection vulnerabilities
- Handle node errors
- Testing SQL and servers
We used all this database and node wizardry to create a page where FAC20 submit their own quotes and wisdom, and receive a cookie containing the wisdom of others!
- Git clone this repo
- Run
npm install
to set up node modules -- enterpsql
--CREATE USER myuser SUPERUSER PASSWORD 'mypassword';
--CREATE DATABASE learn_node_postgres WITH OWNER myuser;
- Create .env file in project
- Add
DATABASE_URL
variable in your .env file and assign to initialised database npm run start
will start the server
npm run test
- Amber : quality ๐ต
- Shaya : design ๐ฉโ๐จ
- Terrence : deployment ๐งโโ๏ธ
- Trish : facilitator ๐งโโ๏ธ
- As a visually impaired user I would like to be able to navigate the page
- As a user, I want to submit my own and other people's pearls of wisdom and check-in question answers for the rest of FAC to read
- As a user, I want to come back later to read our responses as 'fortunes'
- As a user, I want to know how to use the fortune cookie site and what it's for
- Stretch goal: As a FAC20 member, I want to search through the wisdom of my cohort for specific people's answers
- A form for users to submit data
- A page showing all the data
- Semantic form elements with correctly associated labels
- A Postgres database hosted on Heroku
- A schema describing your database in your README
- Tests for server routes
- Tests for database access
- Tests for database access
- Not process user input as SQL commands
- Hidden environment variables (i.e. not on GitHub)
- heroku!! Terrence is a heroku hero
- figma !! Shaya is fiiiine with figma
- dbdiagram (didn't break)
- postgres (are we professionals yet?)
- miro for mirroring our crazy 8s