Giter VIP home page Giter VIP logo

js-todo-list-step2's Introduction

JS 투두리스트 스텝2

자바스크립트와 AJAX를 이용하여 구현 하는 투두리스트

template version

🔥 Projects!

🖥️ 데모 링크


🎯 요구사항

  • 1. User 추가하기
  • 2. User의 투두리스트 불러오기
  • 3. User 삭제하기
  • 3. todoItem 추가하기
  • 4. todoItem 불러오기
  • 5. todoItem complete하기
  • 6. todoItem 삭제하기
  • 7. todoItem contents 내용 수정하기

🎯🎯 심화 요구사항

  • 1. fetch api 사용하는 부분을 async await을 사용하여 리팩토링하기.
  • 2. github issue에서 라벨을 붙이는 것처럼, 우선순위에 따라서 label를 추가하기.
  • 3. ES6 impot & export를 이용해 자바스크립트 파일을 리팩토링하기.

🕵️‍♂️ 제약사항

  • 1. User의 이름은 최소 2글자 이상이어야 한다.
  • 2. TodoItem Contents는 최소 2글자 이상이어야 한다.

📝 API

User list 불러오기

method uri
GET /api/users
{
 response: [...]
}

User 추가하기

method uri
POST /api/users
{
 requestBody: {
   "name": "string"
 },
 response: {
   "_id": "string",
   "name": "string",
   "todoList": []
  }
}

User 불러오기

method uri
GET /api/users/:userId
{
 response: {
   "_id": "string",
   "name": "string",
   "todoList": [...]
  }
}

User 삭제하기

method uri
DELETE /api/users/:userId
{
  response: {
  }
}

User의 Todo Item 불러오기

method uri
GET /api/users/:userId/items/
{
 response: [...]
}

User의 Todo Item 추가하기

method uri
POST /api/users/:userId/items/
{
 requestBody: {
   "contents": "string"
 },
 response: {
   "_id": "string",
   "name": "string",
   "todoList": [...]
  }
}

User의 Todo Item 전부 삭제하기

method uri
DELETE /api/users/:userId/items/
{
 response: {
   "_id": "string",
   "name": "string",
   "todoList": []
  }
}

User의 Todo Item 1개 삭제하기

method uri
DELETE /api/users/:userId/items/:itemId
{
 response: {
   "_id": "string",
   "name": "string",
   "todoList": [...]
  }
}

User의 Todo Item 내용 수정하기

method uri
PUT /api/users/:userId/items/:itemId
{
 requestBody: {
   "contents": "string"
 },
 response: {
  "_id": "string",
   "contents": "string",
   "priority": "string",
   "isCompleted": "boolean"
  }
}

User의 Todo Item 우선순위 수정하기

method uri
PUT /api/users/:userId/items/:itemId/priority
{
 requestBody: {
   "priority": "string" // 'NONE', 'FIRST', 'SECOND'
 },
 response: {
   "_id": "string",
   "contents": "string",
   "priority": "string",
   "isCompleted": "boolean"
  }
}

User의 Todo Item complete toggle

method uri
PUT /api/users/:userId/items/:itemId/toggle
{
 response: {
   "_id": "string",
   "contents": "string",
   "priority": "string",
   "isCompleted": "boolean"
  }
}

⚙️ Before Started

Tip 로컬에서 서버 띄워서 손쉽게 static resources 변경 및 확인하는 방법

로컬에서 웹서버를 띄워 html, css, js 등을 실시간으로 손쉽게 테스트해 볼 수 있습니다. 이를 위해서는 우선 npm이 설치되어 있어야 합니다. 구글에 npm install 이란 키워드로 각자의 운영체제에 맞게끔 npm을 설치해주세요. 이후 아래의 명령어를 통해 실시간으로 웹페이지를 테스트해볼 수 있습니다.

npm install -g live-server

실행은 아래의 커맨드로 할 수 있습니다.

live-server 폴더명

👏🏼 Contributing

만약 미션 수행 중에 개선사항이 보인다면, 언제든 자유롭게 PR을 보내주세요.


🐞 Bug Report

버그를 발견한다면, Issues에 등록해주세요.


📝 License

This project is MIT licensed.

js-todo-list-step2's People

Contributors

eastjun-dev avatar wmakerjun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.