분류 전체보기(329)
-
7 주차 ( + 협업을 통해 느낀점 ) [ WIL ]
이번주에 알게된 것 1. 협업을 통해 느낀점 https://muyeon95.tistory.com/230 클론 프로젝트 주차 회고 [ TIL ] organization : https://github.com/CowDogHome CowDogHome CowDogHome has 3 repositories available. Follow their code on GitHub. github.com repository : https://github.com/CowDogHome/Clone-BE GitHub - CowDogHome/Clone-BE Contribute to CowDogHome/Clone-BE deve muyeon95.tistory.com 2. passport https://muyeon95.tistory.com..
2023.07.30 -
클론 프로젝트 주차 회고 [ TIL ]
organization : https://github.com/CowDogHome CowDogHome CowDogHome has 3 repositories available. Follow their code on GitHub. github.com repository : https://github.com/CowDogHome/Clone-BE GitHub - CowDogHome/Clone-BE Contribute to CowDogHome/Clone-BE development by creating an account on GitHub. github.com 회고 이번주차 프로젝트는 소통의 중요성을 많이 느꼈던 한주였다. 첫날 회의를 긴시간 했음에도 불구하고 API 명세서에 대해 자세히 예기하지 않아 다음날 다시 긴..
2023.07.27 -
passport.js [ node.js ]
왜 passport 로그인을 사용할까? passport.js 는 서비스가 다양한 로그인을 동시에 사용해야할 때, 즉 strategy 만 짜면 나머지는 하면 알아서 된다. req.user 를 만들어 주는 것, 매번 세션 검증해주는 것 등이 내부에서 저절로 구현되기 때문에 사용한다. 1. 다양한 인증 전략 지원 passport.js 는 500개가 넘는 인증 전략을 지원한다. 이는 소셜로그인, OAuth, OpenID 등 다양한 인증 방법을 통일된 API 로 사용할 수 있게 해준다. 즉 인증 전략이 변경되거나 추가되어도 일관된 코드 구조를 유지할 수 있다. 2. 유연성과 확장성 passport.js 는 단지 인증 메커니즘을 제공하는 미들웨어일 뿐, 세션 관리나 사용자 데이터 관리 등을 직접적으로 다루지는 않는..
2023.07.27 -
6 주차 ( + 협업을 통해 느낀점 )[ WIL ]
이번주에 알게된 것 CI/CD : https://muyeon95.tistory.com/222 CI/CD CI/CD 란? CI/CD (Contunuous Integration/Continuous Delivery) 는 애플리케이션 단계를 자동화하여 애플리케이션을 더욱 짧은 주기로 고객에게 제공하는 방법 기본적인 개념은 지속적인 통합, 지속적인 서비스 muyeon95.tistory.com https://overjoyed-sailfish-366.notion.site/CI-CD-db415d8512e94125930fe71cb0b73091?pvs=4 CI/CD 참조 링크 overjoyed-sailfish-366.notion.site Github Action : https://muyeon95.tistory.com/22..
2023.07.23 -
에러처리 미들웨어 [ express ] [ node.js ]
다른 미들웨어 함수와 동일한 방법으로 오류 처리 미들웨어 함수를 정의할 수 있지만, 오류 처리 함수는 3개가 아닌 4개의 인수, 즉 (err. req. res, next) 를 갖는다는 점이 다르다. 오류 처리 미들웨어는 다른 app.use() 및 라우트 호출을 정의한 후에 마지막으로 정의해야 하며, 예를 들면 다음과 같다. // app.js // ... // 에러 핸들링 미들웨어 정의 app.use((err, req, res, next) => { const status = err.statusCode || 500; const errorMessage = err.message || "서버 에러"; res.status(status).json({ errorMessage, }); }); // ... 미들웨어 함수 ..
2023.07.22 -
AWS multer-s3 오류 TypeError: this.client.send is not a function
TypeError: this.client.send is not a function 이 에러는 AWS S3 에 접근할 수 없다는 에러였다. aws 에 퍼플릭 엑세스로 설정을 바꾼뒤 해결되었다. 이후 다른 문제가 발생했는데, req.file 을 불렀을때 값이 비어있었고, 당연히 req.file.location 도 작동하지 않았다. 아래는 해당 코드이다. // awsMulterModules.js const multer = require("multer"); const AWS = require("aws-sdk"); const multerS3 = require("multer-s3"); const path = require("path"); require("dotenv").config(); AWS.config.upda..
2023.07.21