User Story
- 使用者可以新增一筆 todo 並指定名稱
- 使用者可以瀏覽全部 todo 清單,並名稱排序
- 使用者可以查看特定 todo 的詳細資料
- 使用者可以編輯一筆 todo 的名稱與完成狀態
- 使用者可以刪除一筆 todo
路由
- 瀏覽所有 todo ⇒ get ⇒ /api/todos
- 新增一筆 todo 紀錄 ⇒ post ⇒ /api/todos
- 瀏覽特定 todo 的詳細資料 ⇒ get ⇒ /api/todos/:id
- 修改特定 todo 紀錄 ⇒ put ⇒ /api/todos/:id
- 刪除特定 todo 紀錄 ⇒ delete ⇒ /api/todos/:id
資料結構
- Todo
- title:string
- isDone:boolean
建立專案
- 開啟新專案 todolist
- 在 mysql 建立新的資料庫 todolist
- 將專案初始化
- 修改腳本 "dev": "nodemon app.js"
- 啟動專案