Skip to content

Latest commit

 

History

History
79 lines (50 loc) · 2.57 KB

setup-notes.md

File metadata and controls

79 lines (50 loc) · 2.57 KB

development notes

dockers essentials

server environment setup

node --version npm --version - check version of node and npm

npm init - created the package.json file

npm install express --save -g - install express

npm install --save-dev nodemon - install nodemon for development (to restart server automatically anytime you make changes to source code)

npm list express - check version of express installed

npm install --save-dev typescript ts-node @types/node @types/express - install typescript, typescript-node - install node and express types

client environment setup

  • npx create-react-app 'app-name' --template typescript --use-npm

    • create a react app with typescript and npm
  • npm install --save typescript @types/node @types/react @types/react-dom @types/jest

    • install typescript for react
  • npm run

    • run this in the app-name's root dir after creating base react app to start development server for the client side
  • no need to install nodemon for react development server

    • built-in hot reload exists, created by create-react-app

db environment setup

  • to the .env file of the db docker, add this entry (actual password customizable)

    • POSTGRES_DB=db-name
      POSTGRES_PASSWORD=db-password
      
  • docker exec -it postgres-docker psql -U postgres

    • login to the running postgres container
  • create database db-name;

    • after logging into the container
  • Bookshelf.js ORM tutorial

  • A case against ORM

ORM setup