I Learned/TIL

    [TIL] Nest 중복 호출 오류, Node process.cwd()와 __dirname의 차이

    [TIL] Nest 중복 호출 오류, Node process.cwd()와 __dirname의 차이 날짜 2022.07.13. 목표 Nest.js 학습 내용 Nest.js - @**InjectConnection** 중복 호출 오류 오류 메세지 ERROR [ExceptionHandler] Nest can't resolve dependencies of the AuthService (JwtService, ?, UsernameConnection). Please make sure that the argument UserConnection at index [1] is available in the AuthModule context. Potential solutions: - If UserConnection is..

    [TIL] Mongo - import json file

    [TIL] Mongo - import json file 날짜 2022.07.12 내용 MongoDB - import json file for macOS mongoimport 설치 brew install mongodb/brew/mongodb-database-tools 실행 $ mongoimport \ --uri= \ --drop=.json --jsonArray -c 결론 랜덤하게 생성한 JSON 형태의 파일을 MongoDB에 import하는 방법을 학습 및 실습 했습니다.

    [TIL] Klip, EIP-5114

    [TIL] Klip, EIP-5114 날짜 2022.07.10 목표 SBT 구현을 위한 학습 내용 KaKao Klip - App2App API Authentication 기본적으로 인증이 필요하지 않음 API 요청시 - Request Key를 발급하여 사용 Request Key 발급 절차 prepare API를 통해 인증 또는 서명할 내용을 전달 응답으로 Request Key를 전달 전달받은 Request Key를 이용하여 Deep Link를 호출하고, 모바일 카카오톡 더보기 탭에 있는 Klip 실행 처리 결과는 Result API를 통해 polling Query 파라미터 Request Key에 어떤 요청에 대한 처리 결과를 얻고자 하는지 전달 Ethereum - EIP-5114 : SoulBound T..

    [TIL] Nest.js 프로바이더와, React-Native 안드로이드 설정

    [TIL] Nest.js 프로바이더와, React-Native 안드로이드 설정 날짜 2022.01.01 목표 Nest.js 학습 내용 Nest.js - Provider Provider : 앱이 제공하는 핵심 기능인 비즈니스 로직 수행 Service, Repository, Factory, Helper 등 @injectable 데코레이터 사용 다른 어떤 Nest 컴포넌트에서도 주입 가능해짐 import { Injectable } from '@nestjs/common'; @Injectable() export class UsersService { ... remove(id: number) { return `This action removes a #${id} user`; } } 사용 @Controll..

    [TIL] Nest.js 컨트롤러 부분 학습

    [TIL] Nest.js 컨트롤러 부분 학습 날짜 2022.07.06. 목표 Nest.js 학습 내용 Nest.js - Controller MVC 패턴에서 Controller에 해당 Request로 받은 데이터를 처리하고 결과를 Response하는 인터페이스 역할 Nest.js - Routing 데코레이터 사용 @Get('/hello') getHello(): string { return this.appService.getHello(); } 와일드카드 사용 가능 @Get('he*lo') getHello(): string { return this.appService.getHello(); } Nest.js - Request/Response Object import { Request..

    [TIL] Nest.js Decoration

    [TIL] Nest.js Decoration 날짜 2022.07.04 목표 내용 Nest.js - 데코레이터 파이썬의 데코레이터나 자바의 어노테이션과 유사 클래스, 메서드, 접근자, 프로퍼티, 매개변수에 적용 가능 JS - +로 숫자형 변환 const str = '123'; console.log(typeof str); // string console.log(typeof Number(str)); // number console.log(typeof parseInt(str)); // number console.log(typeof +str); // number 결론 nest.js의 데코레이션을 보면서 자바 스프링이 생각났습니다. 이미 스프링 조금 공부해봤기에 비교적 쉽게 배울 수 있을 것 같습니다. JS에서 +..

    [TIL] Github Actions 기초

    [TIL] Github Actions 기초 날짜 2022.07.03 목표 새로운 프로젝트 준비 내용 GitHub Actions 개념 Events - Git에서 발생하는 머지, 커밋 등에 따라 발생하는 이벤트 Workflows - 발생한 Event에 따라 진행하려는 작업 흐름 Jobs - 기본적으로 병렬로 작업을 수행하는 하나의 작업 단위 Step - Job의 순서대로 여러 명령어 사용 Actions - Github에 누군가 잘 정의해놓은 라이브러리 같은 것 Runners - Jobs들을 각각 실행 VM 또는 Docker 컨테이너와 유사 작성법 # /.github/workflows/workflow.yml 생성 name: my-github-actions # 깃헙 액션 이름 지정 on: [push] # pus..

    [TIL] 무한 스크롤

    [TIL] 무한 스크롤 날짜 2022.06.30. 목표 없음 내용 React - 무한 스크롤 Scroll Event 브라우저 크기와 스크롤 위치에 따라 스크롤 const { innerHeight } = window; // 브라우저창 내용의 크기 (스크롤을 포함하지 않음) const { scrollHeight } = document.body; // 브라우저 총 내용의 크기 (스크롤을 포함한다) const { scrollTop } = document.documentElement; // 현재 스크롤바의 위치 // scrollTop과 innerHeight를 더한 값이 scrollHeight보다 크다면 if (Math.round(scrollTop + innerHeight) >= scrollHeight) { 결론 ..

    [TIL] React/Next 로딩 화면 및 클립보드 구현

    [TIL] React/Next 로딩 화면 및 클립보드 구현 날짜 2022.06.29. 목표 로딩 및 클립보드 기능 구현 내용 Next.js - 로딩 화면 구현 // _app.tsx import Router from "next/router"; import {useState, useEffect} from 'react' export default function App({ Component, pageProps }) { const [loading, setLoading] = useState(false); const start = () => { setLoading(true); }; const end = () => { setLoading(false); }; useEffect(() => { Router...

    [TIL] React - Hydration Error

    [TIL] React - Hydration Error 날짜 2022.06.28. 목표 SDAO 프로젝트 디버깅 내용 React - Hydration Error 원인 - 렌더링하는 동안 pre-rendering React 트리와 브라우저의 첫 번째 Rendering와 차이로 인해 발생 해결 - useEffect를 사용하여 상태를 변경해준다. import { useEffect, useState } from 'react' function MyComponent() { const [color, setColor] = useState('blue') useEffect(() => setColor('red'), []) return Hello World! } 참조 react-hyd..