안녕하세요. 이번에 신입으로 입사한 주니어 개발자입니다. 입사한 회사에서 msa환경에서 서버끼리는 gRPC통신를 이용해서 통신을 하고 클라이언트와는 게이트웨이를 통해서 통신하는 프로젝트를 nest.js를 이용해서 만드는 온보딩 미션을 주셨는데요. 공식문서를 계속 읽어보고 하는데 아직 gRPC와 msa환경을 처음 접해서 그런가 만들어보려니 감이 잡힐거같으면서도 어렵네요. 먼저 nest.js의 기본적인 http로 통신하는 시스템을 만들어보고 그 이후에 리팩토링해서 요구조건을 만족하게 만드는게 나을까요?
안녕하세요 저는 강사님 강의로 공부하고 파이썬으로 코테를 준비하고 있습니다. 저와 같은 상황에 계신분들과 공유하고 싶어 글을 올립니다. 파이썬 풀이에서 부족한 부분 알려주시면 수정하겠습니다.~ import sys sys.setrecursionlimit(10 ** 6) N, M = map(int, sys.stdin.readline().split()) MAX = 1000 + 10 graph = [[False for in range(MAX)] for in range(MAX)] visited = [False for in range(MAX)] for in range(M): x, y = map(int, sys.stdin.readline().split()) graph[x][y] = True graph[y][x] = True def dfs(idx): visited[idx] = True for j in range(1, N + 1): if not visited[j] and graph[idx][j]: dfs(j) cnt = 0 for i in range(1, N + 1): if not visited[i]: dfs(i) cnt += 1 print(cnt)
영상에서 알려주신대로 파일을 설정하고 실행하면 다음과 같은 에러가 발생합니다. 잘 안보일 수 있어서 아래에 적습니다. Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/run/desktop/mnt/host/e/Study-App/codecamp-backend/class/section04/04-07-docker-compose-with-mongoose-board2/backend/index.js" to rootfs at "/myfolder/index.js": mount /run/desktop/mnt/host/e/Study-App/codecamp-backend/class/section04/04-07-docker-compose-with-mongoose-board2/backend/index.js:/myfolder/index.js (via /proc/self/fd/9), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type 결국 경로를 못찾는다는 얘기로 이해했는데요. 그래서 yaml파일을 다음과 같이 고쳐봤습니다. 그러면 실행이 되는 것처럼 나오지만 이러한 에러가 발생합니다. 근데 이상한건 다른 터미널에서 docker ps를 실행하면 다음과 같이 하나만 실행된 것처러럼 나오는데... 막상 현재 실행되고 있는 터미널에서 ctrl + c를 하면 다음과 같이 2개가 중지되는걸로 나옵니다. 어디서부터 잘못된 걸까요 ㅠ_ㅠ
docker-compose.yml파일의 코드는 이렇게 구성하였는데요 도커컴포즈하면 mysql데이터 가져오고싶은데 어떻게 해야하나요? volume으로 해봤는데 해당 데이터들은 못가져오고 새로 table을 생성되는데 이렇게 구성되어있습니다 main스키마의 table들을 가져오고싶습니다. 이렇게해봤는데도 원하는대로 데이터를 가져오지못했습니다 mysql연결도 안되는 상황입니다 어떻게 해야 해결할수있을까요?
docker-compose.yaml에서 강의대로 소스를 수정했습니다. 그 후 yarn add mongoose를 하고 index.js를 수정한 후 그리고 docker-compose build를 했는데요. my-backend는 만들어졌는데 my-database가 만들어지지 않습니다. my-database 부분은 아예 실행조차 하지 않은것처럼 보이는데요. 구글에서도 잘 찾아지지 않아 질문 드립니다.
yujinseung@yujinseung-ui-MacBookPro slack_nest % npm run db:generate-migration > study_nest@0.0.1 db:generate-migration > npm run typeorm migration:generate -- ./src/migrations -d ./dataSource.ts > study_nest@0.0.1 typeorm > typeorm migration:generate ./src/migrations -d ./dataSource.ts Error during migration generation: Error: Unable to open file: "/Users/yujinseung/Desktop/slack_nest/dataSource.ts". Cannot use import statement outside a module at CommandUtils.loadDataSource (/Users/yujinseung/Desktop/slack_nest/node_modules/typeorm/commands/CommandUtils.js:22:19) at async Object.handler (/Users/yujinseung/Desktop/slack_nest/node_modules/typeorm/commands/MigrationGenerateCommand.js:68:26) yujinseung@yujinseung-ui-MacBookPro slack_nest % npm run db:migrate > study_nest@0.0.1 db:migrate > npm run typeorm migration:run -- -d ./dataSource.ts > study_nest@0.0.1 typeorm > typeorm migration:run -d ./dataSource.ts Error during migration run: Error: Unable to open file: "/Users/yujinseung/Desktop/slack_nest/dataSource.ts". Cannot use import statement outside a module at CommandUtils.loadDataSource (/Users/yujinseung/Desktop/slack_nest/node_modules/typeorm/commands/CommandUtils.js:22:19) at async Object.handler (/Users/yujinseung/Desktop/slack_nest/node_modules/typeorm/commands/MigrationRunCommand.js:41:26) 위 두 오류가 뜹니다..! 뭐가문제일까요..ㅠㅠ
완전탐색 강의 마지막 문제 1090번 문제 풀이 방법에 의문이 생겨서 질문 올려봅니다. 강의에서는 우리의 집 중에서 한 곳에 모이면 된다고 풀이를 하셨는데, 예시에 나온 4 15 14 15 16 14 15 16 15 4명이 모이기 위한 최적의 장소는 (15,15)입니다. 백준에서도 이것이 정답 좌표이고. 그래서 혹시 제가 1번 2번 3번 아이디어를 이해하는데에서 잘못 이해한 부분이 있을까 싶어 질문을 올립니다. (15 14) (15 16) (14 15) (16 15) 중에 하나에 모인다는 말이 아닌것인가요?
안녕하세요. (2022년도 강의) 섹션13. Microservice - API-Gateway 2 강의에서 질문이 있습니다. Microservice의 Graphql기반의 API 서버를 구성하는 예제에서 Gateway 서버에서 아래와 같은 에러가 발생합니다. (캡쳐 참고) const wrapAnsi = require('wrap-ansi'); Error [ERR_REQUIRE_ESM]: require() of ES Module /api-gateway/node_modules/wrap-ansi/index.js from /api-gateway/node_modules/@nestjs/cli/node_modules/inquirer/lib/utils/screen-manager.js not supported. Node모듈에서 import 방식이 아닌 require 를 통해 다른 모듈을 로드해서 오류라는 것 같은데요. 이 경우, 어떻게 해야할까요? ㅠ