Coder Social home page Coder Social logo

modern-js-todo-list's Introduction

Modern JS Todo List

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 .

Tip ์œˆ๋„์šฐ์—์„œ ์‹คํ–‰ ์‹œ ๋ณด์•ˆ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ๊ฒฝ์šฐ

# Powershell ๊ด€๋ฆฌ์ž ๋ชจ๋“œ์—์„œ
Set-ExecutionPolicy Unrestricted

๐Ÿ“ License

This project is MIT licensed.

modern-js-todo-list's People

Contributors

junwork123 avatar

Watchers

 avatar

modern-js-todo-list's Issues

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.