안녕하세요! 강의 잘 듣고 있는 수강생 입니다! 제로초님 강의를 보면 다음과 같은 코드가 있을 때 const express = require('express'); const path = require('path'); const app = express(); app.get('/',(req,res)=>{ res.sendFile(path.join(__dirname,'index.html')); console.log('GET / '); }) app에 대한 HTTP METHOD 를 지원하는 라우팅 함수 및 req, res 에서 사용할 수 있는 함수들에 대해 자동 완성 되는 부분을 봤는데요. (예:`app.get()`,`res.writeHead()` 등) vscode의 각종 extensions 들을 설치해보고 vscode 자체의 옵션도 찾아봤지만 도저히 제로초님 처럼 자동 완성 되지가 않네요ㅜㅜ 제가 이클립스를 사용하다가 이번에 노드 공부해보려고 다른 IDE를 사용해서 그런지 자동완성이 되지 않는 부분이 매우 불편한데 혹시 강사님 개발 환경 공유 가능할까요? 강의와는 상관이 없는 질문인 점 죄송합니다
안녕하세요 좋은 강의 감사합니다. 개념을 확립하는데 정말 도움이 많이 됐습니다. DB구조를 계속 고민하게 되어 질문 남겨봅니다. 상점table-도큐먼트가 10만개(필드20개) 정도 있고, 상품table-도큐먼트가 30만개(필드15개)정도 있는 DB입니다. 이걸 몽고디비 콜렉션에서 어떻게 구성하는 것이 좋을 지 아무리 고민해도 답이 안나와 선배님의 조언을 듣고 싶습니다. Main 검색은 상품명 이고 프론트에는 지역기반 필터가 있습니다. (지역은 상점과 상품 모두 필드로 포함) 강의를 듣고 내린 결론은 1도큐먼트로 통합인데 아래 3가지로 고민을 했었습니다. 상점과 상품을 one 도큐먼트로 통합 후 1 Collection 구성 ->30만 도큐먼트 (상품기준, 상점중복저장,필드25개) 상점 콜렉션에 상품을 어레이필드로 저장 -> 10만도큐먼트 (상점기준, 중복저장없음, 필드 21개) 각각의 콜렉션 후 lookup 상품 콜렉션에 상점을 어레이필드로 저장 저는 1번이 가장 빠를 것 같은데 조언 부탁드립니다. 감사합니다.
질문은 자세하게 적어주실 수록 좋습니다. 2-6 Vue CLI 설치 강의 Node. js 파일까지 설치 완료 -> Vue 설치 진행 과정에서 아래와 같은 오류가 뜹니다. npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead. npm warn deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. npm warn deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported npm warn deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead. npm warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated apollo-datasource@3.3.2: The apollo-datasource package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm warn deprecated apollo-server-errors@3.3.1: The apollo-server-errors package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the @apollo/server package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm warn deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm warn deprecated apollo-server-types@3.8.0: The apollo-server-types package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the @apollo/server package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm warn deprecated apollo-server-plugin-base@3.7.2: The apollo-server-plugin-base package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the @apollo/server package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm warn deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm warn deprecated shortid@2.2.16: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm warn deprecated apollo-reporting-protobuf@3.4.0: The apollo-reporting-protobuf package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the @apollo/usage-reporting-protobuf package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm warn deprecated apollo-server-env@4.2.1: The apollo-server-env package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the @apollo/utils.fetcher package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm warn deprecated subscriptions-transport-ws@0.11.0: The subscriptions-transport-ws package is no longer maintained. We recommend you use graphql-ws instead. For help migrating Apollo software to graphql-ws , see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using graphql-ws , see https://github.com/enisdenjo/graphql-ws/blob/master/README.md npm warn deprecated vue@2.7.16: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details. changed 852 packages in 1m 75 packages are looking for funding run npm fund for details 재설치도 해 봤는데, 안되네요..! 도와주세요! 추가로 터미널에 작성할 때 폴더명 뒤에 % 이것도 넣어야 하나요?
비디오 업로드 FORM 만들기 (1) 에서 npm run dev를 하고 페이지를 확인하면 이러한 에러가 발생합니다. 어떻게 해결하면 좋을까요? 이외 기타에러 1. [1] WARNING in ./node_modules/mutationobserver-shim/dist/mutationobserver.min.js [1] Module Warning (from ./node_modules/react-scripts/node_modules/source-map-loader/dist/cjs.js): [1] Failed to parse source map from 'C:\Users\iokl3\OneDrive\문서\0. git\John_Ahn\John_Ahn_Youtube_React\1. Dev\boilerplate-mern-stack-master\client\node_modules\mutationobserver-shim\dist\mutationobserver.map' file: Error: ENOENT: no such file or directory, open 'C:\Users\iokl3\OneDrive\문서\0. git\John_Ahn\John_Ahn_Youtube_React\1. Dev\boilerplate-mern-stack-master\client\node_modules\mutationobserver-shim\dist\mutationobserver.map' [1] @ ./node_modules/rc-menu/es/DOMWrap.js 166:2-34 이외 기타에러 2. [1] ERROR in ./node_modules/antd/es/version/index.js 2:15-22 [1] Should not import the named export 'version' (imported as 'version') from default-exporting module (only default export is available soon) [1] @ ./node_modules/antd/es/index.js 65:0-47 65:0-47 [1] @ ./src/components/views/Footer/Footer.js 5:0-28 18:57-61 [1] @ ./src/components/App.js 12:0-43 71:35-41 [1] @ ./src/index.js 86:0-35 99:35-38
안녕하세요~ 데이터베이스 이해와 실습 CRUD 실습을 진행하다가 오류로 인하여 다음차시 진행이 불가하여 질문드립니다. PS C:\Users\폴더이름\Desktop\database> node db.js Error: querySrv ENOTFOUND _mongodb._ tcp.cluster0.mongodb.net at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:291:17) { errno: undefined, code: 'ENOTFOUND', syscall: 'querySrv', hostname: '_mongodb._ tcp.cluster0.mongodb.net ' 관련하여 챗GPT에 오류 내용을 검색해본 후 원인 및 해결방법에 대해 아래 내용을 얻을 수 있었는데요 인터넷 연결 확인: 인터넷 연결이 정상적으로 이루어지고 있는지 확인하세요. 특히, 네트워크에 제한이 있거나 프록시 서버를 사용하는 경우 문제가 발생할 수 있습니다. DNS 설정 문제: DNS 설정 문 제로 인해 _mongodb._tcp.cluster0.mongodb.net 도메인이 해결되지 않을 수 있습니다. DNS 서버를 Google Public DNS(8.8.8.8, 8.8.4.4)로 변경하여 문제가 해결되는 지 확인해보세요. Windows에서 DNS 설정 변경 방법: 제어판 > 네트워크 및 인터넷 > 네트워크 및 공유 센터 > 어댑터 설정 변경 으로 이동합니다. 사용 중인 네트워크 연결을 마우스 오른쪽 버튼으로 클릭하고 속성 을 선택합니다. 인터넷 프로토콜 버전 4 (TCP/IPv4) 를 선택한 후 속성 을 클릭합니다. 하단에 있는 다음 DNS 서버 주소 사용 을 선택하고, 8.8.8.8 과 8.8.4.4 를 입력합니다. 설정을 저 장하고 다시 시도해보세요. MongoDB Atlas의 클러스터 주소 확인: cluster0.mongodb.net 이 아니라 클러스터의 정확한 호스트명을 사용하고 있는지 확인하세요. MongoDB Atlas에서 클러스터의 연결 문자열을 다시 복사하여 확인하세요. Atlas UI에서 데이터베이스 > Connect > Connect Your Application을 선택하고, 제공된 연결 문자열을 확인하세 요. 예를 들어: bash 코드 복사 mongodb+srv://<username>:<password>@cluster0.mongodb.net/test?retryWrites=true&w=majority useUnifiedTopology 옵션 사용: 최신 버전의 MongoDB 드라이버를 사용하고 있는지 확인하고, useUnifiedTopology 옵션이 활성화되어 있는지 확인하세요. javascript 코드 복사 const client = new MongoClient(uri, { useNewUrlParser: true, useUnifiedTopology: true }); 방화벽 또는 네트워크 제한: 회사 네트워크나 특정 ISP에서 DNS 쿼리 또는 MongoDB Atlas에 대한 연결을 제한할 수 있습니다. 이런 경우, 다른 네트워크(예: 휴대폰 핫스팟)에서 시도해보거나, 네트워크 관리자에게 문의하세요. SRV 레코드 대신 표준 연결 문자열 사용: SRV 레코드( mongodb+srv:// ) 대신 표준 MongoDB 연결 문자열( mongodb:// )을 시도해보세요. SRV 레코드를 지원하지 않는 네트워크 환경에서 표준 연결이 문제를 해결할 수 있습니다. 현재 회사에서 지급한 노트북으로 진행하여 보안상 문제가 있어 작업이 불가한건지.. 위 내용을 읽어봐도 명확하지 않아 질문드립니다.
Error: Route.post() requires a callback function but got a [object Undefined] at Route.<computed> [as post] (C:\nodeSns\sns\node_modules\express\lib\router\route.js:216:15) at proto.<computed> [as post] (C:\nodeSns\sns\node_modules\express\lib\router\index.js:521:19) at Object.<anonymous> (C:\nodeSns\sns\routes\auth.js:13:8) at Module._compile (node:internal/modules/cjs/loader:1358:14) at Module._extensions..js (node:internal/modules/cjs/loader:1416:10) at Module.load (node:internal/modules/cjs/loader:1208:32) at Module._load (node:internal/modules/cjs/loader:1024:12) at Module.require (node:internal/modules/cjs/loader:1233:19) at require (node:internal/modules/helpers:179:18) at Object.<anonymous> (C:\nodeSns\sns\app.js:12:20) npm start 하면 자꾸 이 오류가 뜨는데 원인을 못 찾겠습니다.
내 게시물 모두 불러오기나 해시태그로 검색하기 등 api 서버에 요청 보낼 때 authorization 헤더에 jwt를 넣어서 보내도록 코딩 했는데 이를 확인할 수 있는 방법이 궁금합니다. 그리고 아래 화면에서 connect.sid로 전달된 세션 키와 연결된 세션에 해당 사용자의 jwt 값이 req.session.jwt 로 들어있는 건가요?
9강에서는 대체로 console.error(err); next(err); 이런 식으로 에러를 처리했고 10강에서는 res.json 으로 에러 코드, 메세지를 반환하고 있는데 이 둘의 차이가 뭔가요? 에러 처리 미들웨어를 사용할 때와 json을 반환할 때를 어떻게 정할 수 있는지(?) 기준이 궁금합니다.
궁금한 점이 있습니다. 9강에서 만든 NodeBird 서비스의 구조는 프론트엔드가 따로 있는 것이 아니라 서버 측에서 nunjucks와 html 파일들을 사용하여 화면을 구성하는 것이 맞나요? 1번이 맞고, 백엔드에서 직접 html을 생성하여 클라이언트에게 제공하는 구조라면 제가 공부한대로는 SSR 방식인 것 같은데 맞나요? 프론트엔드를 따로 만들어서 서버와 연동하려면 app.js의 아래 코드와 views 폴더를 삭제하고 프론트 쪽에서 서버 측에서 만든 주소들을 호출하면 되나요? // app.js의 일부 app.set("view engine", "html"); nunjucks.configure("views", { express: app, watch: true, });
[리뉴얼] 처음하는 MongoDB(몽고DB) 와 NoSQL(빅데이터) 데이터베이스 부트캠프 [입문부터 활용까지] (업데이트)
MongoDB Aggregateion 기본 명령 이해하기1 수업 3분쯤에 db.movies.aggregate([{$match:{year:1995}]) 문법을 그대로 따라 쳤는데, 에러같은건 전혀 나지 않고 이 화면이 나옵니다. movies콜렉션에 데이터가 아무것도 안들어있는건가요?? 뭐가 문제인건지 모르겠습니다 ㅠㅠ 이것저것 찾아보니 제가 설치한 movies 컬렉션에는 데이터가 0건인거 같은데 왜 이런건가요? 강의에서 하라는대로 그대로 따라했습니다 ㅠ 몇 번 삭제하고 다시 해봐도 똑같이 데이터가 0건인거같아요
안녕하세요. 좋은 강의 잘 듣고 있습니다. 프런트와 Pub/Sub연결하기 강의를 듣고 있는데 아래와 같은 문제가 발생하였습니다. 시간 되실 때 확인해 주시면 감사하겠습니다. 빠른 시작 WebSocket API로 서비스에 연결하고 Pub/Sub 시작 -> 2개 새탭 열고 각 url 입력 후 메세지 상호작용 확인. front 소스 코드 적용 후 아래 이미지와 같이 정상적 연결 성공 뜸. front페이지 새로 고침 이 후 url 입력 한 창에서 메세지 입력하여도 front페이지개발자 도구의 console에서는 변화가 없음. data가 있는 json 메세지를 받아야 하는데 변화가 없네요. 유료강의로 상용화 가능한 azure기반 chatbot강의도 해주시면 감사하겠습니다.
deserializeUser에서 req.user에 넣을 팔로잉이랑 팔로워 찾으실 때, as는 모델 관계의 as를 따라간다고 하셨는데 왜 위 코드에서 Follwers 가 //팔로잉 이고 Followings 가 //팔로워 라고 하신 건지 모르겠습니다ㅜ 예를 들어, 저의 팔로잉을 찾으려면 제 아이디를 팔로워 아이디에서 찾아야 하니까 기준 아이디가 followerId가 되는 Followings가 맞는거 아닌가요?
req.login를 통해 req.session에 { 랜덤값: 유저아이디} 를 저장하는 건 알겟는데, connect.sid=랜덤값 을 쿠키에 넣는 시점은 언제인가요? 그리고 서버가 connect.sid 를 세션 쿠키로 전송할 때, express-session 은 자동으로 이 값을 secret으로 서명하여 전송하나요?