Giter VIP home page Giter VIP logo

hanghae_node3week's People

Contributors

codeing999 avatar jeunghosub avatar rumaro122 avatar unchaptered avatar

hanghae_node3week's Issues

과제 피드백

잘 정리된 문서와 깃, 코드 컨벤션이 인상적이었습니다.
다만 Update 파일명 같은 커밋명 보단 무엇을 수정했는지 요약해서 나타내는편이 커밋의 목적에 맞다고 생각합니다.
조회하는 메소드와 실행하는 메소드를 분리하신것도 인상깊었습니다.
전체적으로 아쉬운 부분이 없다고 생각합니다.
제가 공부할때와 수준이 다른거 같아 놀랍습니다.
다음 프로젝트가 정말 기대됩니다!

Bug : 상대경로 수정 필요 : _Error: Cannot find module './layers/routers/user.router'_

Error: Cannot find module './layers/routers/user.router'
Require stack:
- 폴더경로\src\index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (폴더경로\src\index.js:4:20)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '폴더경로\index.js' ]
}

Bug : jwt.js에서 맞는 userid인지 db쿼리를 하지 않으면 jwt.verify() 단계에서 서버 죽음

Behavior

module이라는 역할에 맞게 db쿼리는 그 안에서 하지 않게 하려고 빼보았지만.
그걸 검증하지 않고 verify 단계로 들어가면 그 함수 호출 즉시 에러가 나면서 서버가 죽습니다.
함수 내부에서 나는 에러라 그런지 catch문에 걸리지도 않는 것 같습니다.
일단은 다시 있는 user인지 검사하는 query를 넣어서 서버가 죽지 않게는 해놨습니다. (현재 풀리퀘스트되어있는 것은 서버가 죽는 버전입니다.)

  1. Expected behavior
    로그인이 필요한 서비스로 넘어간 후에 거기서 있는 user인지 검증을 대신하면 문제 없다고 생각함.

  2. Actual behavior
    서버가 죽음.

  3. Describe the bug
    service 단계로 넘어가기 전에 jwt verify 함수 호출을 해야하는데 그 단계에서 에러가 남.

1. Environment

- Node : v16.15.1
- npm : v8.11.0

2. Screenshots

JsonWebTokenError: invalid signature
at C:\Users\jcl12\OneDrive\바탕 화면\projects\hanghae_node3week\node_modules\jsonwebtoken\verify.js:133:19
at getSecret (C:\Users\jcl12\OneDrive\바탕 화면\projects\hanghae_node3week\node_modules\jsonwebtoken\verify.js:90:14)
at Object.module.exports [as verify] (C:\Users\jcl12\OneDrive\바탕 화면\projects\hanghae_node3week\node_modules\jsonwebtoken\verify.js:94:10)
at module.exports (C:\Users\jcl12\OneDrive\바탕 화면\projects\hanghae_node3week\src\modules\jwt.js:23:32)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.