차세대 Node.js 백엔드 서버 개발(Fastify & Prisma & Typescript와 함께하는)
npx prisma migrate dev --name init Environment variables loaded from .env Prisma schema loaded from prisma\schema.prisma Datasource "db": PostgreSQL database "postgres", schema "public" at "localhost:5432" Error: P1001: Can't reach database server at localhost:5432 Please make sure your database server is running at localhost:5432 . 해당 오류를 어떻게 고쳐야할지 모르겠습니다.
차세대 Node.js 백엔드 서버 개발(Fastify & Prisma & Typescript와 함께하는)
인증구현 - 회원가입(register) 강의 중 4분 23초 경에 401 error로 not expired token라는 에러가 있더라구요. 보통 토큰이 만료되었을 때, 해당 토큰을 사용해서 접근하려고 하면 나오는 에러라고 단순히 생각했었는데, 자세히 보니까 "not" expired token 이라고 되어있는데, 토큰이 만료되지 않았는데 왜 에러인가요?
차세대 Node.js 백엔드 서버 개발(Fastify & Prisma & Typescript와 함께하는)
안녕하세요 수업내용에서 알려준 사이트에서 openssl 을 설치하니 아래와 같이 나오는데 비용 지불을 해야 하는지요? 일회성으로 해서 설치는 되었는데 터미널에서 openssl genrsa -out server.key 2048 명령어 실행이 안되는데 어떻게 해야 할까요 ?
차세대 Node.js 백엔드 서버 개발(Fastify & Prisma & Typescript와 함께하는)
섹션5 인증관련 login 기능 코드를 수업과 똑같이 작성 했는데 postman 에서 { "success": false, "status": 400, "message": "Bad Request" } 에러 뜹니다. 터미널에서 뜨는내용 {"level":50,"time":1718325166296,"pid":23544,"hostname":"DESKTOP-BDGKO8E","reqId":"req-d","err":{"type":"Error","message":"\"expiresIn\" should be a number of seconds or string representing a timespan eg: \"1d\", \"20h\", 60","stack":"Error: \"expiresIn\" should be a number of seconds or string representing a timespan eg: \"1d\", \"20h\", 60\n at module.exports [as sign] (D:\\Practice\\slog-fastify-prisma-ts-study\\node_modules\\jsonwebtoken\\sign.js:213:22)\n at generateRefreshToken (d:\\Practice\\slog-fastify-prisma-ts-study\\src\\lib\\authHelper.ts:54:30)\n at Object.loginWithPassword (d:\\Practice\\slog-fastify-prisma-ts-study\\src\\services\\authService.ts:46:30)\n at Object.<anonymous> (d:\\Practice\\slog-fastify-prisma-ts-study\\src\\routes\\auth\\index.ts:24:28)"},"msg":"\"expiresIn\" should be a number of seconds or string representing a timespan eg: \"1d\", \"20h\", 60"} {"level":30,"time":1718325166297,"pid":23544,"hostname":"DESKTOP-BDGKO8E","reqId":"req-d","res":{"statusCode":400},"responseTime":44.27779999934137,"msg":"request completed"} 어디 부분을 수정해야 하는지요?
차세대 Node.js 백엔드 서버 개발(Fastify & Prisma & Typescript와 함께하는)
안녕하세요 강의를 듣다가 궁금한 부분이 있어서 질문드립니다!! User에 대한 모델을 정의할 때 comments, likes도 정의하는 데 이 둘은 각각의 articles 모델에 대한 comments, likes라고 생각되는 데 왜 User 모델에도 정의되어 있는지 궁금합니다!! 각각의 articles 모델에 대한 comments, likes라도 User에서 정의해야 하는 건가요?
차세대 Node.js 백엔드 서버 개발(Fastify & Prisma & Typescript와 함께하는)
안녕하세요. TypeError 관련하여 문의드립니다. 강의 회차는 Fastify 기본 설정입니다. 먼저 아래는 제가 실습하는 환경입니다. Mac OS Ventura Node Version : v18.19.1 NPM Version : 10.2.4 아래는 오류에 대한 내용입니다. TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/jiyong/Desktop/Stater-Kit/src/main.ts at new NodeError (node:internal/errors:405:5) at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:136:11) at defaultGetFormat (node:internal/modules/esm/get_format:182:36) at defaultLoad (node:internal/modules/esm/load:101:20) at nextLoad (node:internal/modules/esm/hooks:864:28) at load (/Users/jiyong/Desktop/Stater-Kit/node_modules/ts-node/dist/child/child-loader.js:19:122) at nextLoad (node:internal/modules/esm/hooks:864:28) at Hooks.load (node:internal/modules/esm/hooks:447:26) at MessagePort.handleMessage (node:internal/modules/esm/worker:196:24) at [nodejs.internal.kHybridDispatch] (node:internal/event_target:786:20) { code: 'ERR_UNKNOWN_FILE_EXTENSION' } [nodemon] app crashed - waiting for file changes before starting... 이미 커뮤니티에 해당 오류와 관련하여 질문이 있길레 강사님이 답변하신 부분을 보고 체크해봤지만 제 코드상 잘못된 부분을 못찾겠더라구요 그래서 Google Drive에 올려놓으신 fastify-init.zip 을 통하여 진행해보았지만 같은 오류가 뜹니다. 해결 방법을 알 수 있을까요 ?