If you have Postgres installed by other means, you can skip this section. You do not need Docker.
- Node.js
- Express.js
- Postgres with pg (Wednesday)
- Postgres with Sequelize ORM (Thursday)
psql -U postgres
- Connect to Postgres with user 'postgres'\l
- List all databases\c <database>
- Connect to a database\dt
- List all tables\d <table>
- List all columns in a table\q
- Quit
- ORM - Object Relational Mapping
- CRUD - Create, Read, Update, Delete
-
If using Docker, start the container with
npm run start:db
-
Connect to the Postgres container
psql -U postgres
- Create a database
CREATE DATABASE "academy";
Do not forget the semicolon at the end of the statement!!
fuser -k 3000/tcp
firewall-cmd --add-port=3000/tcp
Postgres has Tables and Rows
Sequelize has Classes and Objects