Skip to content

Commit

Permalink
update react hw
Browse files Browse the repository at this point in the history
  • Loading branch information
aszx87410 committed Nov 27, 2018
1 parent 7fe6cbe commit a62cab5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ HTML 的部分就簡單帶過幾個常見的 tag,帶到 head 的一些屬性

除此之外也會教大家用 React Router 這一套 library,來實做前端的路由。

而資料的部分,則是串接 [Firebase API](https://firebase.google.com/docs/),直接把資料存在 Firebase 裡面,讓大家練習串接新的 API。
[HW13 作業連結](/homeworks/week13)

延伸閱讀:[前後端分離與 SPA](https://blog.techbridge.cc/2017/09/16/frontend-backend-mvc/)[跟著小明一起搞懂技術名詞:MVC、SPA 與 SSR](https://medium.com/@hulitw/introduction-mvc-spa-and-ssr-545c941669e9)

Expand Down
19 changes: 17 additions & 2 deletions homeworks/week13/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,23 @@

1. 美化部落格主頁
2. 美化部落格文章頁面
3. 實作出登入以及登出功能
4. 登入之後可以發文
3. 使用 React Router
4. 串接 API
5. 加入發文的功能(無須登入)

API 格式:

endpoint:http://45.55.26.18:3310
使用說明:https://github.com/typicode/json-server

```
POST /posts {title, author, body} 新增 posts
GET /posts 取得所有 post
GET /posts/:id 取得某個 post
DELETE /posts/:id 刪除 post
PUT /posts/:id {title, author, body} 更新 post
```


## hw2:簡答題

Expand Down
23 changes: 21 additions & 2 deletions homeworks/week14/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,27 @@

1. 刪除文章
2. 編輯文章
3. 編輯靜態頁面
4. 可以用 Markdown 格式來撰寫文章
3. 加入登入功能,要登入之後才能發文、刪除跟修改文章
3. 可以用 Markdown 格式來撰寫文章(加分題)

登入的帳號密碼都固定為 user01

API 格式:

endpoint:http://45.55.26.18:3310
使用說明:https://github.com/typicode/json-server

```
POST /login {username, password} 登入
GET /me 如果有登入會回傳現在的使用者資料
GET /logout 登出
POST /posts {title, author, body} 新增 posts
GET /posts 取得所有 post
GET /posts/:id 取得某個 post
DELETE /posts/:id 刪除 post
PUT /posts/:id {title, author, body} 更新 post
```


## hw2:簡答題

Expand Down

0 comments on commit a62cab5

Please sign in to comment.