본문 바로가기

TIL150

WEBPACK with ES6(babel) Babel is a JavaScript compilerBabel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments. Here are the main things Babel can do for you: Transform syntax. A polyfill is a piece of code (usually JavaScript on the Web) used to provide modern functionality on older browsers that do not nat.. 2020. 2. 12.
WEBPACK WEBPACK is module bundler 많은 파일들을 가져와서, webpack에게 주면, webpack은 static 파일로 변환해준다.(브라우저도 알아들을 수 있도록 해준다.) file => webpack => file (compatible files) for browser. ***npm install webpack webpack-cli*** => webpack-cli는 터미널에서 webpack을 쓸 수 있게 해준다. ***webpack.config.js 파일 생성*** package.json 에서, 노드 서버와, webpack이 다르게 running 할 수 있도록 만들어주면 편리하다. ex) "dev:assets": "WEBPACK_ENV=development webpack", "build:a.. 2020. 2. 11.
regular expression and option ESlint는 에러를 잡는데 도움을 준다. for code structure npm install eslint videos = await VideoModel.find({ title: { $regex: searchingBy, $options: "i" } }); regular expression을 통해 SEARCH 기능, 검색을 하면 데이터 값을 불러온다. $option: "i" means insensitive. => 대문자, 소문자 상관 없이 데이터를 불러올 수 있다. https://docs.mongodb.com/manual/reference/operator/query/or/ export const searchControllerGlobal = async (req, res) => { const { query.. 2020. 2. 10.