- 2020, following tutorials by nomadcoders.co
- Cloning Youtube with Vanilla and NodeJS
- Node JS, Express
- MongoDB, Mongoose
$ npm init
$ npm install express
$ node index.js
$ npm install @babel/node @babel/preset-env @babel/core
$ npm install cookie-parser body-parser
$ npm install nodemon -D
$ npm install dotenv
$ npm install webpack webpack-cli
# install packages that don't need to be included in dependencies
# only for dev process, devDependencies
# change in pacakge.json: "start": "nodemon --exec babel-node index.js",
# autostart the server when code changes
$ npm start # after babel, npm start is shortcut of command node index.js
$ npm install webpack webpack-cli
# create webpack.config.js file in root dir
$ npm install --save-dev extract-text-webpack-plugin@next
# @ 쓰면 exact version install, @next beta version or sth
$ npm install css-loader postcss-loader sass-loader
$ npm install autoprefixer
$ npm install node-sass
- change in pacakge.json: "start": "nodemon --exec babel-node index.js --delay 2"
- give delay time between babel start & index.js function to avoid bugs
- express
$ npm install morgan
$ npm install helmet
$ brew services start mongodb-community@4.2
$ mongo # check if mongo is running
// open command prompt as administrator
$ net start mongodb
$ net stop mongodb
- mongodb is perfect for json file
- regex101.com
- for mongodb data
- module bundler
- modules with dependencies --> webpack --> static assets (old, normal scripts)
- we want to change scss to css, extract the text and save it into css file
- postcss, autoprefixer
- package.json: "dev:assets": "WEBPACK_ENV=development webpack -w"
- 파일 바껴도 계속 자동으로 run 하게끔 수정
- babel-loader
- @babel/polyfill
- MOV files don't work well : sound only