전체 글(263)
-
docker-compose networks를 사용해서 로컬에서 간편하게 개발하기
사용 이유여러 종류의 DB Volumes의 데이터를 한 곳에서 관리하기 위함같은 DB를 각각의 서버가 동일하게 바라보기 위함간단하게 실행 및 관리를 쉽게 하기 위함사용 방법docker-compose.yml, shart.sh 파일을 생성shart.sh파일을 실행시킨다.파일 생성참고volumes를 설정 할 때 도커 컨테이너에 저장되는 위치를 DB마다 정확하게 지정해주어야 데이터가 사라지지 않는다.DB 마다 저장되는 위치가 다르니 확인해주어야한다.docker-compose.yml 파일# docker-compose.ymlservices: mysql: image: mysql:8.1 container_name: mysql environment: MYSQL_ROOT_PASSWORD: roo..
2025.02.22 -
Flutter Doctor iOS error 해결 방안
1. 에러Xcode installation is incomplete; a full installation is necessary for iOS and macOS development.1. 해결 방안해당 커멘드를 실행한다.sudo xcode-select --switch /Applications/Xcode.app/Contents/Developersudo xcodebuild -runFirstLaunch2. 에러CocoaPods not installed.CocoaPods is a package manager for iOS or macOS platform code.Without CocoaPods, plugins will not work on iOS or macOS.2. 해결 방안cocoapods를 설치하면된다.b..
2024.10.21 -
Flutter Doctor Android error 해결 방안
1. 에러cmdline-tools component is missingRun `path/to/sdkmanager --install "cmdline-tools;latest"`See https://developer.android.com/studio/command-line for more details.1. 해결 방안안드로이드 스튜디오에서 해당 부분을 설정을 체크하면된다. 2. 에러Android license status unknown.Run `flutter doctor --android-licenses` to accept the SDK licenses.See https://flutter.dev/to/macos-android-setup for more details.2. 해결 방안터미널에서 해당 명령어를 실행..
2024.10.21 -
find() 함수 대신 Set으로 배열에 해당 값이 존재 하는지 확인 방법
Set.has() 함수를 사용하면 된다. find 함수는 반복문으로 작동하기 때문에 O(n) 시간 복잡도로 작동하고Set.has() 함수 경우에는 O(1) 시간 복잡도로 작동하기 때문에 속도가 훨씬 빠르다* 단 객체와 같은 복잡한 값은 불가능하고, 단순데이터 "String", "Number" 타입만 가능하다. ex)const s1 = "value1"const s2 = "value2"const s3 = "value3"const mySet = new Set([obj1, obj2, obj3]);mySet.has("value2") // truemySet.has("value5") // false
2024.07.05 -
filter(Boolean) 사용 방법
사용 범위배열 안에 부정문 (false, 0, -0, '', null, undefined, NaN)을 filter 처리 사용 예시const data = [false, 0, -0, '', null, undefined, NaN, 123];const result = data.filter(Boolean);console.log(result); // [123]
2024.05.13 -
Promise.all() 사용 방법
1. 사용 범위비동기 요청을 병렬적으로 요청을 진행 할 때 2. 사용 예시const [test, test2] = await Promise.all([ testModel1.findOne(), testModel2.findOne(),]); await Promise.all([ testModel1.create(), testModel2.create(),]); 3. 에러 처리에러 처리 시 외부에서 try/catch는 Promise.all의 에러를 잡지 못한다.그래서 Promise.all 에러를 잡으려고 한다면 프로미스 체인을 통해 에러를 catch 해야한다. const [test, test2] = await Promise.all([ testModel2.findOne(), testMode..
2024.05.13