전체 글 (13) 썸네일형 리스트형 [NestJS] 한 프로젝트에 여러 DB 연결하기 - 블로깅을 통한 코드 작성은 한계가 있습니다. - 정확하고 자세한 방법은 공식문서를 참조해주시길 바랍니다. 기존에 연결되어있는 root DB 는 다음과 같다. // app.module.ts @Module({ imports: [ TypeOrmModule.forRootAsync({ imports: [ConfigModule], inject: [ConfigService], useFactory: (configService: ConfigService) => { return { type: configService.get('DB_TYPE'), host: configService.get('DB_HOST'), port: configService.get('DB_PORT'), username: configService.ge.. [Git] Branch 관리와 Commit Naming Rule 을 통한 협업 우선 필자는 master branch 에 무분별한 개발을 일삼는 개발환경에 있던 개발자이다. 이에 심히 잘 못됨을 깨닫고 다음과 같이 Branch 관리와 Commit Rule 에 대해정리해보았다. https://www.notion.so/gwo0o/Git-Branch-Rule-Commit-Naming-Rule-91ec49ed82ad4eafa5750e36d10f61a3 Git Branch Rule / Commit Naming Rule Branch 에 대한 Rule 입니다. www.notion.so 필자가 중요하게 여긴 것은 branch 의 구분과 버전에 대한 설명. 결국 branch 관리를 하는 이유는 협업 효율을 향상시키기 위함이지 작업환경을 복잡하게 만들려는 목적이 아니다. 따라서 refactor, de.. [NestJS] Query() dto 에서 boolean 이 string 으로 넘어오는 이슈 참고자료 : https://github.com/nestjs/nest/issues/3156 @Query() does not transform to DTO · Issue #3156 · nestjs/nest Bug Report Current behavior I have a controller that needs to recive data from the request query and I want to put that data into a DTO using @query() but it does not properly transform the DTO to ... github.com 우선 해당 이슈의 경우 NestJs 의 이슈로서 처리되었고 완료가 된 이슈입니다. 해당 포스트는 이 이슈에 대한 해결방법을 다루고 .. [TypeORM] repository find option 에 대한 가벼운 정리 Mysql 에서 사용하는 문법과 TypeORM repository 의 문법은 다소 다르다. // MYSQL SELECT * FROM TABLE WHERE TITLE = title ORDER BY ID DESC LIMIT 0, 10 이 문법을 repository의 find 문법으로 옮기게 되면 async findTitle(title: string, dto) { return await this.repository.find({ where: { TITLE: title }, // where 절 order: { id: 'DESC' }, // order by skip: dto.last_id, take: dto.size, // limit last_id, size }); } 다음과 같이 바뀐다. MySQL 의 where.. [Unity 2D] 2단 점프에 대한 구현 // Jump if (Input.GetButtonDown("Jump") && !anim.GetBool("isJumping")) { rigid.AddForce(Vector2.up * jumpPower, ForceMode2D.Impulse); anim.SetBool("isJumping", true); } // Landinf Platfrom if (rigid.velocity.y < 0) { Debug.DrawRay(rigid.position, Vector3.down, new Color(0, 1, 0)); RaycastHit2D rayHit = Physics2D.Raycast(rigid.position, Vector3.down, 1, LayerMask.GetMask("Platform")); if (rayHit... TypeScript index 와 값을 동시에 쓰는 법 items = ['샘플', '데이터', '입니다.'] for (const [index, item] of items.entries()) { console.log(index); console.log(item); } index 와 해당 값을 동시에 써야하는 경우가 종종 나오는데 다음과 같이 Array.entries() 를 활용하게 되면 코드를 좀 더 깔끔하게 짤 수 있다. items = ['샘플', '데이터', '입니다.'] index = 0; for (const item of items) { console.log(index); console.log(item); index += 1; } 이런 지저분한 코드는 쓰지 않도록 하자. [NestJs] QueryRunner save, update사용 - 배우는 단계에서 쓰는 글이기때문에 모든 정보가 100% 정확하지 않을 수 있습니다. - 정확한 정보는 공식문서를 참고하길 바랍니다. async func(id: number, dto: Dto) { const entity: Entity = plainToInstance(Entity, dto); const queryRunner = this.dataSource.createQueryRunner(); await queryRunner.connect(); await queryRunner.startTransaction(); try { // TODO: await queryRunner.commitTransaction(); } catch (err) { await queryRunner.rollbackTransaction();.. [AWS] s3, lambda 를 이용한 image resizing (Mac M1) 우선 필자가 참조한 페이지는 공식문서를 참조하였다. https://docs.aws.amazon.com/ko_kr/lambda/latest/dg/with-s3-tutorial.html 자습서: Amazon S3 트리거를 사용하여 썸네일 이미지 생성 - AWS Lambda 자습서: Amazon S3 트리거를 사용하여 썸네일 이미지 생성 이 자습서에서는 Lambda 함수를 생성하고 Amazon Simple Storage Service(Amazon S3)에 대한 트리거를 구성합니다. Amazon S3는 S3 버킷에 업로드된 각 이 docs.aws.amazon.com 단계 3까지는 별다른 문제없이 순조롭게 진행되었다. 단계4도 그럭저럭... 만들게 되면 다음과 같이 만들어진다. 첫번째 한 실수가 죽어도 node_.. 이전 1 2 다음