Settings Node.js 18.12.1 Koa 2.13.4 Problem import Router from 'koa-router'; const router = new Router(); router.post('/', async (ctx, next) => { const result = await YourService.todo(); ctx.body = result;// [200] OK //ctx.body = '';// [200] OK //ctx.body = null;// [204] No Content }); status를 별도 지정하지 않아도, ctx.body의 값에 따라 자동으로 200이나 204로는 바꿔 주는데, [201] Created 는 찾지 못했습니다. Solution ... async func..
Settings CRA(Create React App) 본 포스팅에서는 CRA 사용이 전제되므로, dotenv 를 별도로 설치 및 설정하는 내용은 없습니다. 환경변수 설정 더보기 # 표준...? 자료 찾아볼 때, 이처럼 [key]=[value] 형식이 제일 많이 보여서... REACT_APP_STANDARD=im://absolute/path ## # 여백 # # whitespace is removed from both ends of unquoted values (see more on trim) # (FOO= some value becomes {FOO: 'some value'}) # 문서를 찾아보니, trim을 사용하여 앞뒤 여백을 제거한다네요. ## REACT_APP_WHITESPACE = space b..
Settings Remix - 0.8.7+commit.e28d00a7 비교 연산자(==) 사용 불가 function compare(string memory lhs, string memory rhs) public pure returns(bool) { return lhs == rhs; } 비교 연산자 사용시, 컴파일 에러 발생 TypeError: Operator == not compatible with types string memory and string memory 비교 방법 위 내용처럼, 비교 연산자는 사용 불가하므로 다른 방안이 필요. Solidity에서는 keccak256을 사용하여 해쉬화 후 비교함. keccak256을 사용하기 위해서는 string을 bytes형으로 변환 필요. 보편적으로 아래 ..
실행 코드 mysqldump -uroot -p [Scheme] < [File Name].sql 출력 -- MySQL dump 10.13 Distrib 5.7.37, for Linux (x86_64) -- -- Host: localhost Database: [Scheme] -- ------------------------------------------------------ -- Server version5.7.37-0ubuntu0.18.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET ..