<aside> 💡 부스트캠프 내에서 오프라인 모각코를 개설하고 관리할 수 있는 서비스
</aside>
# 모노레포 내 모든 애플리케이션의 lint 스크립트 병렬 실행
$ turbo lint
# backend 애플리케이션의 start:dev 스크립트만 실행
$ turbo start:dev --filter backend
# frontend 애플리케이션의 dev 스크립트만 실행
$ turbo dev --filter frontend
# frontend 애플리케이션의 lint, build, dev 스크립트 병렬 실행
$ turbo lint build dev --filter frontend
FE/BE에서 공통으로 사용하는 API 데이터 타입을 위해 공통 타입을 정의하여 사용하였습니다.
.
├── app
│ ├── backend
│ └── frontend
└── packages
├── **apitype**
├── eslint-config
├── tsconfig
└── vault
// API Request Type
export interface RequestCreateMogacoDto {
groupId: Bigint;
title: string;
contents: string;
date: string;
maxHumanCount: number;
address: string;
latitude: number;
longitude: number;
status: string;
}
// API Response Type
export interface ResponseMogacoDto {
id: Bigint;
groupId: Bigint;
title: string;
contents: string;
date: Date;
maxHumanCount: number;
address: string;
latitude: number;
longitude: number;
status: string;
createdAt: Date;
updatedAt: Date;
deletedAt: Date | null;
group: ResponseGroupsDto;
}
// export type Bigint = string;
DB에서 id 값들의 경우 bigint 타입을 사용 중
하지만 bigint 타입을 json으로 직렬화 시킬 경우 에러가 발생함 그렇기 때문에 서버단에서는 json으로 보내는 bigint 타입을 string으로 바꿔서 사용하고 있음
하지만 리액트에서는 bigint 타입을 지원하지않기 때문에 전부 dto를 string으로 변환하였고, bigint라는 타입의 의미는 알아볼 수 있어야한다고 판단되어 다음과 같이 작성함 결론: 좀 더 쉽게 사용하고자 의미는 알아볼 수 있도록 타입을 변경하여 사용
<dialog className={styles.container} open={open}>
<form method="dialog" className={styles.form}>
<div className={styles.textArea}>
<div className={sansBold24}>{title}</div>
{content && <div className={sansRegular16}>{content}</div>}
</div>
<div className={styles.buttonArea}>
<button type='button'>{confirmButtonText}</button>
<button type='button'>{cancelButtonText}</button>
</div>
</form>
</dialog>