---
# System prepended metadata

title: 第八週主線任務與講義
tags: [Node.js 企業專題班 - 2024 春季班, Node.js 入門班 - 2024 春季班]

---


# 第八週主線任務與講義
* [關聯資料表](https://whimsical.com/3CkqgyD3n3GvsCrdkywruw)
* [線上範例程式碼 week8 branch](https://github.com/gonsakon/express-week4-sample)
* [獎品細節](https://www.notion.so/Node-js-147b6bf3874a47adb28fd3a2bb26a261?pvs=4)
## 本日課鋼
* 留言功能
* 一對多、多對多資料庫設計
* 後端工程師 roadmap 設計
* express 架構推薦
* 里程碑追蹤狀況

## 後端 roadmap
* [後端 Back-end 路線圖](https://github.com/goodjack/developer-roadmap-chinese#%E5%BE%8C%E7%AB%AF-back-end-%E8%B7%AF%E7%B7%9A%E5%9C%96)


## express 推薦架構
* [node-express-boilerplate](https://github.com/hagopj13/node-express-boilerplate)

## 範例 API


### 會員功能
1. [POST][註冊會員](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/1fc65740-4d7f-4df7-ac4d-8cf0d573f4e2)：`{url}/user/sign_up`
2. [POST][登入會員](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/)：`{url}/users/sign_in`
3. [PATCH][重設密碼](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/3a7ed05f-8c2a-42c8-9b60-b73fcddb8822)：`{url}/users/updatePassword`
4. [GET][取得個人資料](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/c328cf8f-1de3-4de6-b944-245959af7dd0)：`{url}/users/profile`
5. [PATCH][更新個人資料](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/c328cf8f-1de3-4de6-b944-245959af7dd0)：`{url}/users/profile`


### 會員按讚追蹤動態
1. [POST][追蹤朋友](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/06336974-e446-467d-af3e-7cc133e5b2b1)：`{url}/users/{userID}/follow`
2. [DELETE][取消追蹤朋友](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/a434dc4d-ff70-45a0-b071-293aecb147ab)：`{url}/users/{userID}/unfollow`
3. [GET][取得個人按讚列表](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/f4bf7d1f-0681-4645-a07c-c5ac3cd38065)：`{url}/users/getLikeList` 
4. [GET][取得個人追蹤名單](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/43975aee-4b6b-446f-bc98-9a8bbfb8c81b)：`{url}/users/following`

### 動態貼文
1. [GET][取得所有貼文](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/ace2ccc4-7e50-401b-998a-a14f49e87918)：`{url}/posts`
2. [GET][取得單一貼文](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/7d460150-39fd-44d4-b705-f92b52deddf6)：`{url}/posts/{postID}`
4. [POST][新增貼文](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/dfc7891e-63fd-4141-989a-8776ee7ea9f0)：`{url}/posts`
5. [POST][新增一則貼文的讚](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/ace2ccc4-7e50-401b-998a-a14f49e87918)：`{url}/posts/{postID}/like`
6. [DELETE][取消一則貼文的讚](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/ace2ccc4-7e50-401b-998a-a14f49e87918)：`{url}/posts/{postID}/unlike`
7. [POST][新增一則貼文的留言](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/ace2ccc4-7e50-401b-998a-a14f49e87918)：`{url}/posts/{postID}/comment`
8. [GET][取得個人所有貼文列表](https://xd.adobe.com/view/c0763dbe-fc15-42e8-be0b-8956ed03e675-9525/screen/06336974-e446-467d-af3e-7cc133e5b2b1)：`{url}/post/user/{userID}`

### 其他
1. [POST]上傳圖片：`{url}/upload`

![](https://i.imgur.com/eK2HXz7.png)
