Skip to content

Latest commit

 

History

History
92 lines (72 loc) · 1.21 KB

README.md

File metadata and controls

92 lines (72 loc) · 1.21 KB

서버 시작하기

$ git clone https://github.com/sangminlee98/sample-server.git
$ cd sample-server
$ docker-compose up -d

API 명세

스크린샷 2023-06-01 오후 10 12 50

1. getTodos

Request

  • URL: api/todos
  • Method: GET

Response

{
  "todos": [
    {
      "id": 1,
      "title": "할일 1",
      "done": false
    },
    {
      "id": 2,
      "title": "할일 2",
      "done": true
    },
    {
      "id": 3,
      "title": "할일 3",
      "done": false
    },
  ]
}

2. createTodo

Request

  • URL: api/todos
  • Method: POST
  • Body:
    • title: string

Response

{
  "id": 1,
  "title": "할일 1",
  "done": false
}

3. updateTodo

Request

  • URL: api/todos/:id
  • Method: PUT

Response

{
  "id": 1,
  "title": "할일 1",
  "done": false
}

4. deleteTodo

Request

  • URL: api/todos/:id
  • Method: DELETE

Response

없음