You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- Once we introduce a database into the mix, it is useful to inspect the state persisted in the database, e.g. from the control panel in MongoDB Atlas. Quite often little Node helper programs like the <i>mongo.js</i> program we wrote earlier can be very helpful during development.-->
<!-- You can find the code for our current application in its entirety in the <i>part3-4</i> branch of [this GitHub repository](https://github.com/fullstack-hy2020/part3-notes-backend/tree/part3-4).-->
727
+
<!-- You can find the code for our current application in its entirety in the <i>part3-4</i> branch of [this GitHub repository](https://github.com/fullstack-hy2020/part3-notes-backend/tree/part3-4).-->
在使用 Postman 和 VS Code REST 客户端直接测试后端之后,我们可以确认它似乎可以正常工作。前端似乎也能够与使用数据库的后端正常工作。
1069
1069
1070
-
You can find the code for our current application in its entirety in the <i>part3-5</i> branch of [this GitHub repository](https://github.com/fullstack-hy2020/part3-notes-backend/tree/part3-5).
1070
+
<!--You can find the code for our current application in its entirety in the <i>part3-5</i> branch of [this GitHub repository](https://github.com/fullstack-hy2020/part3-notes-backend/tree/part3-5).-->
@@ -1079,27 +1079,43 @@ You can find the code for our current application in its entirety in the <i>part
1079
1079
1080
1080
#### 3.15: Phonebook database, step3
1081
1081
1082
-
Change the backend so that deleting phonebook entries is reflected in the database.
1082
+
<!--Change the backend so that deleting phonebook entries is reflected in the database.-->
1083
1083
1084
-
Verify that the frontend still works after making the changes.
1084
+
更改后端,使删除电话簿条目会让数据库做出响应改变。
1085
+
1086
+
<!-- Verify that the frontend still works after making the changes. -->
1087
+
1088
+
验证前台在修改后是否仍能工作。
1085
1089
1086
1090
#### 3.16: Phonebook database, step4
1087
1091
1088
-
Move the error handling of the application to a new error handler middleware.
1092
+
<!-- Move the error handling of the application to a new error handler middleware. -->
1093
+
1094
+
将应用程序的错误处理移动到一个新的错误处理中间件。
1089
1095
1090
1096
#### 3.17*: Phonebook database, step5
1091
1097
1092
-
If the user tries to create a new phonebook entry for a person whose name is already in the phonebook, the frontend will try to update the phone number of the existing entry by making an HTTP PUT request to the entry's unique URL.
1098
+
<!-- If the user tries to create a new phonebook entry for a person whose name is already in the phonebook, the frontend will try to update the phone number of the existing entry by making an HTTP PUT request to the entry's unique URL. -->
1099
+
1100
+
如果用户尝试为已经在电话簿中的人创建一个新的电话簿条目,前端将尝试通过向条目的唯一 URL发出 HTTP PUT 请求来更新现有条目的电话号码。
1093
1101
1094
-
Modify the backend to support this request.
1102
+
<!--Modify the backend to support this request.-->
1095
1103
1096
-
Verify that the frontend works after making your changes.
1104
+
修改后端以支持这个请求。
1105
+
1106
+
<!-- Verify that the frontend works after making your changes. -->
1107
+
1108
+
验证前端在修改后是否仍能工作。
1097
1109
1098
1110
#### 3.18*: Phonebook database step6
1099
1111
1100
-
Also update the handling of the <i>api/persons/:id</i> and <i>info</i> routes to use the database, and verify that they work directly with the browser, Postman, or VS Code REST client.
1112
+
<!-- Also update the handling of the <i>api/persons/:id</i> and <i>info</i> routes to use the database, and verify that they work directly with the browser, Postman, or VS Code REST client. -->
1113
+
1114
+
同时更新 <i>api/persons/:id</i> 和 <i>info</i> 路由的处理,以使用数据库,并验证它们是否可以直接与浏览器、Postman 或 VS Code REST 客户端一起工作。
1115
+
1116
+
<!-- Inspecting an individual phonebook entry from the browser should look like this: -->
1101
1117
1102
-
Inspecting an individual phonebook entry from the browser should look like this:
0 commit comments