sysnar / nestjs-typeorm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NestJS_TypeORM

inflearn의 "따라하며 배우는 NestJS" 강의를 수강한 결과물입니다.

사용한 기술스택

Nest.js, TypeORM, JWT, Passport, PostgreQL

게시판

전체 게시판

URI: /boards
Method: GET

게시글 생성

URI: /boards
Method: POST

  • Request

    {
      "title": "제목",
      "description": "내용"
    }
  • Response

    {
      "id": "게시글 ID",
      "title": "제목",
      "description": "내용",
      "status": BoardStatus, // PUBLIC, PRIVATE
      "user": User // id, username, password
    }

게시글 업데이트

URI: /boards/:id/status
Method: PATCH

  • Request

    {
      "status": "PUBLIC" || "PRIVATE",
    }
  • Response

    {
      "id": "게시글 ID",
      "title": "제목",
      "description": "내용",
      "status": BoardStatus, // PUBLIC, PRIVATE
      "user": User // id, username, password
    }

게시글 삭제

URI: /boards/:id
Method: Delete

  • Response: status 200

인증

회원가입

URI: /boards/:id/status
Method: PATCH

  • Request

    {
      "username": "유저명",
      "password": "비밀번호"
    }
  • Response: status 200

로그인

URI: /auth/signup
Method: POST

  • Request

    {
      "username": "유저명",
      "password": "비밀번호"
    }
  • Response: access token: string

About


Languages

Language:TypeScript 96.2%Language:JavaScript 3.8%