
터미널에서 아래 명령어를 입력하여 Swagger 관련 패키지를 설치합니다.npm install --save @nestjs/swagger swagger-ui-express main.ts 파일에 다음과 같이 설정을 추가합니다.import { NestFactory } from '@nestjs/core';import { AppModule } from './app.module';// Swagger 관련 importimport { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';async function bootstrap() { const app = await NestFactory.create(AppModule); // Swagger 설정 추가 const c..

vs-code 터미널에 아래 명령어를 입력하여 mermaid-cli를 설치합니다.npm install -g @mermaid-js/mermaid-cli 아래의 diagram.mmd 처럼 원하는 내용으로 파일을 생성합니다. 간단하게 gpt에 '로그인 흐름을 정리한 mermaid 작성해줘.' 라고 입력하여 생성해 봅니다.sequenceDiagram participant Client participant Frontend participant Backend participant Redis Note over Client,Frontend: 1. 로그인 요청 Client->>Frontend: 로그인 정보 입력 Frontend->>Backend: POST /auth/login (id..
Git Bash에서 docker-compose up 실행 시docker-credential-desktop: executable file not found 오류가 발생했다.$ docker-compose up[+] Running 0/1 - pgadmin Pulling 0.0s error getting credentials - err: exec: "docker-credential-desktop": executable file not found in %PATH%, out: `` where docker-credential-desktop 명령어를 실행하여 확인해보니 해당 파일은 존재한다.$ where docker-credential-desk..
NestJS 실습을 하다 보면 DTO(Data Transfer Object)를 클래스(class)로 작성하는 것을 자주 보게 됩니다. 그런데 TypeScript에서는 interface도 타입 정의가 가능한데, 왜 하필 클래스를 쓰는 걸까요?그 이유는 바로 런타임(Runtime)에 있습니다.interface는 컴파일 타임에만 존재TypeScript의 interface는 오직 컴파일 타임에만 존재합니다. 즉, TypeScript가 JavaScript로 변환될 때 인터페이스는 전부 사라집니다. 런타임에는 아무 정보도 남아있지 않기 때문에, 실행 중에 이 타입을 활용할 수 없습니다.interface CreateUserDto { name: string;}이렇게 작성된 인터페이스는 JS로 컴파일되면 완전히 없어집..
1. LCP (Largest Contentful Paint)👉 페이지에서 가장 큰 콘텐츠(예: 이미지, 텍스트 블록)가 화면에 렌더링되는 데 걸리는 시간항목설명의미유저가 페이지 로딩이 끝났다고 느끼는 시점대상 요소큰 이미지, , 등의 텍스트 블록기준 (좋음)2.5초 이하면 우수개선 방법이미지 최적화, 서버 응답 속도 개선, 폰트 로딩 최적화💡 예시:사용자가 사이트에 들어왔을 때, 화면 대부분을 차지하는 배너 이미지가 2.3초만에 나타나면 → LCP = 2.3s2. INP (Interaction to Next Paint)**👉 사용자가 버튼을 누르거나 입력을 했을 때, 화면에 반응이 렌더링되기까지 걸린 시간항목설명의미반응성(Responsiveness) 측정대상클릭, 키보드 입력 등 모든 사용자 인터..
REST는 자원 중심(Resource-Oriented) 이기 때문에,URL은 "무엇을" 다루는지 (명사)를 표현하고,HTTP 메서드(GET, POST 등)는 "어떻게" 처리할지를 표현해야 함.잘못된 방식 (행위 중심)GET /getItemPOST /createItemDELETE /deleteItem?id=1메서드 이름을 URL에 표현하는 건 RESTful하지 않음HTTP 메서드 자체가 이미 의미를 내포하고 있기 때문에 중복바람직한 방식 (자원 중심)GET /items // 아이템 목록 조회GET /items/123 // 특정 아이템 조회POST /items // 아이템 생성PUT /items/123 // 아이템 수정DELETE /items/123 ..
typeof value === "object"는 객체({})나 배열([]) 같은 참조 타입을 의미함하지만 원시값(number, string, boolean, null, undefined, symbol, bigint)은 객체가 아님원시값과 객체 비교 예제console.log(typeof 42); // "number"console.log(typeof "hello"); // "string"console.log(typeof true); // "boolean"console.log(typeof null); // "object" (JS의 버그, 실제로는 원시값!)console.log(typeof {}); // "object"console.log(typeof []); // "object"
- Total
- Today
- Yesterday
- math.h
- jackson 라이브러리
- counter
- x.y.z (메이저.마이너.패치)
- 프로세스 강제 종료
- pwa(progressive web app)
- styled-components
- structuredclone()
- stdlib.h
- mermaid-cli
- chrome extension 자동 배포
- json.parse(json.stringify())
- Jest
- 소프트웨어 버전 관리
- named export vs default export
- public vs assets
- 중첩 함수(nested function)
- javascript 필수 문법
- 시맨틱 버전(semantic versioning
- useEffect
- react router
- ajax (asynchronous javascript and xml)
- defaultdict
- react
- Collections
- inp
- 쉽게 풀어쓴 C언어 Express
- 원시값(primitive)
- core web vitals
- semver)
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |