Skip to content

Instantly share code, notes, and snippets.

@joonseokhu
Last active December 9, 2019 06:24
Show Gist options
  • Save joonseokhu/55cdaf7dfa84814d128d4be0c1b7d93f to your computer and use it in GitHub Desktop.
Save joonseokhu/55cdaf7dfa84814d128d4be0c1b7d93f to your computer and use it in GitHub Desktop.
nodejs course

nodejs

비동기런타임 개념, nodejs의 장점 node/express 기본세팅 서버시작시 실행코드와 요청시 실행코드 라우터/미들웨어

  • res.send, res.json
  • 라우터 path, 라우터 메소드
  • 쿼리, 동적파라미터
  • 라우터 순서, next
  • 미들웨어간 흐름제어
    • 중첩라우트
    • 가드
  • 404
  • 에러핸들러 미들웨어

json파일을 활용한 연습용 crud api

  • crud, http
  • fs
  • 비동기, promise
  • async, await
  • 비동기 에러처리, 에러전파

DB

  • erd
  • 모델링
  • crud api 구현
    • 목록조회, 페이지네이션
    • 단일조회
    • 생성/수정

인증

  • 단방향해시(bcrypt)
  • jwt
    • jwt의 xss 탈취, 변조
  • 토큰체크 미들웨어
  • 가드 미들웨어

유효성검사

  • express-validator

응답 추상화, 에러처리

  • 목록조회
  • 단일조회
  • 생성
  • 수정
  • 권한에러
  • 유효성에러
  • 404에러
  • 500에러

외부api 사용

  • axios
  • axios promise 처리

파일업로드

  • multer
  • aws s3
  • multer-s3

further

  • 크론잡
  • 크롤링
  • 웹소켓
  • 쿠키, 세션
    • origin, signature, httponly, session
    • redis
  • TDD
  • 배포 (pm2, nginx, docker)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment