Skip to content

numoonchld/todo-app-pern-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

todo-app-pern-stack

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

server setup

  • docker-compose run --rm --service-ports node_dev_env

  • npm init -y

  • npm install express pg cors --save

  • npm install --save-dev nodemon

db

login

  • docker exec -it postgres-docker psql -U postgres

db setup related commands

  • \l: lists all data bases
  • \c ~dbname~: move inside a database
  • \dt: show table in database
  • CREATE DATABASE perntodo;: creates DB names perntodo
  • CREATE TABLE todo(~schema~);: create table called todo

server connection to the database

  • 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 the psql command line after logging in to the docker

client setup

  • 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

run the developmental app

  • docker-compose up
    • automatically starts everything

references and solutions to errors