workbench for https://youtu.be/ldYcgPKEZC8
- this branch uses Bootstrap 4 for the UI elements like in the tutorial
- go to this branch for the Material-UI implementation
-
docker-compose run --rm --service-ports node_dev_env
-
npm init -y
-
npm install express pg cors --save
-
npm install --save-dev nodemon
docker exec -it postgres-docker psql -U postgres
\l
: lists all data bases\c ~dbname~
: move inside a database\dt
: show table in databaseCREATE DATABASE perntodo;
: creates DB namesperntodo
CREATE TABLE todo(~schema~);
: create table called todo
- ensure the database and the tables have been setup on the database already for this PERN stack
- run the commands stored in the
database.sql
in thepsql
command line after logging in to the docker
- run the commands stored in the
npx create-react-app . --use-npm
- the Dockerfile might need to be moved out before running this command, just paste it back after the base app has been bootstrapped
docker-compose up
- automatically starts everything