codestates / codestates/Reciper-server
[✍️ Dev Log] 정송이 / 2021-05-11
- Dominant language
- TypeScript
- Stars
- 9
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
### 오늘은 어떻게 프로젝트에 기여했나요?
- 파이널 프로젝트 팀장이 되었다
- 팀원들 레포 초대, 프로젝트 기획 설문조사 작성 및 제출
- client, server 레포의 issues templates 업로드 + label 생성 + milestone, project 생성
- 어제까지 완료한 SR 내용을 [wiki](https://github.com/codestates/Reciper-client/wiki)와 notion에 업로드
- wiki 틀 만들기(필요 페이지 구성 + 일부 페이지 내용 작성)
- [Team Members](https://github.com/codestates/Reciper-client/wiki/Team-Members), [Team Rule](https://github.com/codestates/Reciper-client/wiki/Team-Rule), [Project Goals](https://github.com/codestates/Reciper-client/wiki/Project-Goals), [Sitemap](https://github.com/codestates/Reciper-client/wiki/Sitemap), [DB Schema](https://github.com/codestates/Reciper-client/wiki/DB-Schema), [API Document](https://github.com/codestates/Reciper-client/wiki/API-Document), [Web Design](https://github.com/codestates/Reciper-client/wiki/Web-Design), [Flow Chart](https://github.com/codestates/Reciper-client/wiki/Flow-Chart) 작성
- #1 server 초기 setup
- express, typescript를 사용하여 구축
- #3 데이터베이스 구축하기
- typeORM을 사용하여 구축
- `users`, `stacks`, `recruits`, `recruit_comments` 테이블 entity 생성
- aws - rds로 데이터베이스 생성
- 스키마 디자인 보완
- #6 OAuth 인증 로그인 기능 구현
- google을 이용한 로그인(`loginGoogle`)
- github을 이용한 로그인(`loginGithub`)
- 구현한 기능에 맞춰 API 문서 보완
- #2 route 정리(OAuth + Email)
- routes 폴더, controllers 폴더로 분리
- API 문서에 따라 하위 폴더로 분리(login, profile, recruit, project 등)
- #10 login 기능을 client와 연결하기
- API 문서 설명해주기(endpoint + login url with client id)
- `npm start`로 서버-클라이언트 잘 작동하는지 확인하기
### 오늘의 프로젝트에서 힘든 점은 무엇인가요?
- typeORM은 처음이라 승길님과 데이터베이스 구축 + entity 만들때 좀 고생했다
특히 ManyToMany 구현할때.. 제대로 생성되었는지 확인하기 어려워서 조금 헤맨 부분도 있었다
(PK, FK가 동시에 적용되었는지 확인하기 어려웠음)
결론은 우리가 올바르게 생성했으나, mysql 터미널 view 문제였던 것으로..
```js
// mysql에서 다중 key 확인하기
SELECT * FROM information_schema.table_constraints;
```
- First Project와 달리 이번에는 route, controller를 폴더 별로 나누고 한 기능 당 하나의 파일을 사용하여 관리하려고 한다
그래서 오늘 폴더, 파일을 정리하는 과정에서 `import`와 `export` 부분이 헷갈려서 조금 헤맸다
```js
import 기능이름 from '기능 작성한 파일의 상대 위치';
export {
기능이름
};
```
- #14 express에서 `cors()`를 middleware로 추가할 때 이렇게 작성해야한다고 한다
```js
app.use('/', (req, res, next) => {
cors(corsOption);
next();
});
```
그런데 실제로 적용해보니 에러가 발생하였다. 이부분에 대해서 좀 더 고민 + 공부해야할 것 같다

### 내일은 프로젝트에 기여하기 위해 무엇을 해야 하나요?
- [x] profile, recruit 기능 구현 시작
- [x] 이미지 업로드에 대해서 고민+공부
- [x] API 문서 보완
- [x] 구현한 기능들을 client와 연결하기
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.