#3.0 MongoDB and Mongoose
1 mongdb 설치
2 mongoose
$npm install mongoose
#3.1 Connecting to MongoDB
1. $ npm install dotenv 설치
#3.2 Configuring Dot Env
dotenv 를 활용하여 보안관련 정보를 숨김
#3.3 Video Model
model 폴더생성
Video.js 파일 생성
#3.4 Comment Model
model 폴더 Comment.js 부분작성
#3.5 Home Controller Finished
async,catch 사용법
#3.6 Uploading and Creating a Video
middleware multar 다운로드
$ npm install multar
첫 비디오 업로드
#3.7 Uploading and Creating a Video part Two
파일경로 재생 오류 수정
#3.8 Getting Video by ID
videoDetail.pug 부분작성
#3.9 Editing a Video
Eeit Video 기능구현
#3.10 Deleting a Video
delete 기능구현
#3.11 Installing ESLint
<eslint + pretter 설치과정>
vscode 좌측메뉴 Extension에서
ESLint
Prettier
를 찾아 인스톨 한다
$ npm install eslint -D
$ eslint --init (global로 설치하지 말고 local로 설치 해야한다 -g(x))
airbnb-base로 선택해 설치
$ npm install eslint-config-prettier -D
$ npm install esilnt-plugin-prettier -D
$ npm install prettier-eslint -D
위 설치후
.eslintrc에 그림의 코드를 추가 해준다 (검사하지 않을 코드목록)
최종 설치후
#3.12 Searching Videos
검색기능 구현
코멘트 뷰 기능 부분구현
#3 MongoDB 파트 끝.