Skip to content

Example-Collection/NestJS-TypeORM-Example

Repository files navigation

NestJS Example

프로젝트 설명

  • 이 프로젝트는 NestJS를 이용해 기본적인 CRUD를 수행하는 예시입니다.

  • 기술 스택 : TypeScript + NestJS + TypeORM

  • 개발하며 정리한 글들 : 링크

기능 설명

  • 간단한 게시판 API를 구현할 것이다.
    사실상 모든 CRUD는 게시판의 연장선이라고 생각하기 때문이다.
    우선 테이블 구조는 아래와 같다.

  • 또한 JWT를 이용해서 간단한 인증 절차 및 middleware를 적용할 것이다.

  • 사용자(users) 테이블은 아래의 컬럼들을 가진다.

    • user_id (INTEGER, PK)
    • name (VARCHAR(200), NOT NULL)
    • email (VARCHAR(200), NOT NULL, UNIQUE)
    • password (VARCHAR(1000), NOT NULL)
  • 게시판(boards) 테이블은 아래의 컬럼들을 갖는다.

    • board_id (INTEGER, PK)
    • title (VARCHAR(400), NOT NULL)
    • content (VARCHAR(1000), NOT NULL)
    • created_at (DATETIME, NOT NULL)
    • last_modified_at (DATETIME, NOT NULL)
  • 구현할 API 들은 아래와 같다.

  • 회원 등록 : [POST] /user

  • 회원 정보 수정 : [PUT] /user/{userId}

  • 회원 정보 조회 : [GET] /user/{userId}

  • 회원 정보 삭제 : [DELETE] /user/{userId}

  • 글 등록 : [POST] /user/board/{userId}

  • 글 수정 : [PATCH] /user/board/{userId}/{boardId}

  • 글 삭제 : [DELETE] /user/board/{userId}/{boardId}

  • 특정 글 조회 : [GET] /board/{boardId}

  • 글 조회 : [GET] /board?page=number&size=number

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy