전체 글
-
Mac에서 Homebrew 설치에러 (command not found: brew)개발 초기 셋팅 2023. 2. 24. 15:58
개발환경 셋팅하면서 다음으로 넘어가야하는데 계속 command not found: brew 에러가 났다. 해결방법: /bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/nrubin29/bea5aa83e8dfa91370fe83b62dad6dfa/raw/48f48f7fef21abb308e129a80b3214c2538fc611/homebrew_m1.sh)" 그대로 복사해서 터미널에 입력하기 제대로 실행되는지 확인하려면 터미널에 brew -v 또는 brew help 입력해서 확인 버전 확인되면 설치 완료..!
-
Mixins - pug 참고사이트카테고리 없음 2023. 2. 23. 13:05
https://pugjs.org/language/mixins.html Mixins – Pug Mixins Mixins allow you to create reusable blocks of Pug. //- Declaration mixin list ul li foo li bar li baz //- Use +list +list foo bar baz foo bar baz Mixins are compiled to functions, and can take arguments: mixin pet(name) li.pet= name ul +pet('cat') + pugjs.org
-
Iteration - pug 참고사이트카테고리 없음 2023. 2. 23. 13:05
https://pugjs.org/language/iteration.html Iteration – Pug Iteration Pug supports two primary methods of iteration: each and while. each Pug’s first-class iteration syntax makes it easier to iterate over arrays and objects in a template: ul each val in [1, 2, 3, 4, 5] li= val 1 2 3 4 5 You can also get the index pugjs.org
-
구조분해할당카테고리 없음 2023. 2. 23. 12:28
기존 작성법 const year = req.query.year; const rating = req.query.rating; 구조분해할당으로 만들어보면 const { year } = req.query const { rating } = req.query 근데 변수가 두 개니까 그냥 한 번에 묶어서 아래처럼 작성 좀 더 짧게 작성 const { query: { year, rating } } = req; const { query: { year, rating } } = req; -> 해석은 req의 query의 year / req의 query의 rating 끄읕
-
req.params 참고 사이트카테고리 없음 2023. 2. 23. 11:55
https://expressjs.com/en/5x/api.html#req.params Express 5.x - API Reference Express 5.x API Note: This is early beta documentation that may be incomplete and is still under development. express() Creates an Express application. The express() function is a top-level function exported by the express module. const express = require(' expressjs.com
-