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
Copy file name to clipboardExpand all lines: src/content/3/en/part3d.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,7 +123,7 @@ When the app is being developed, it is more than likely that something fails. Eg
123
123
124
124

125
125
126
-
The network tab of the browser console revealed that fetching the notes did not succeed, the request just remained for a long time in the _pending_ state until it failed with statuscode 502.
126
+
The network tab of the browser console revealed that fetching the notes did not succeed, the request just remained for a long time in the _pending_ state until it failed with status code 502.
127
127
128
128
The browser console has to be open <i>all the time!</i>
129
129
@@ -135,11 +135,11 @@ The database url was _undefined_, so the command *fly secrets set MONGODB\_URI*
135
135
136
136
When using Render, the database url is given by defining the proper env in the dashboard:
137
137
138
-

138
+

139
139
140
140
The Render Dashboard shows the server logs:
141
141
142
-

142
+

143
143
144
144
You can find the code for our current application in its entirety in the <i>part3-6</i> branch of [this GitHub repository](https://github.com/fullstack-hy2020/part3-notes-backend/tree/part3-6).
145
145
@@ -149,7 +149,7 @@ You can find the code for our current application in its entirety in the <i>part
149
149
150
150
### Exercises 3.19.-3.21.
151
151
152
-
#### 3.19*: Phonebook database, step7
152
+
#### 3.19*: Phonebook database, step 7
153
153
154
154
Expand the validation so that the name stored in the database has to be at least three characters long.
155
155
@@ -173,7 +173,7 @@ You can display the default error message returned by Mongoose, even though they
173
173
174
174
**NB:** On update operations, mongoose validators are off by default. [Read the documentation](https://mongoosejs.com/docs/validation.html) to determine how to enable them.
175
175
176
-
#### 3.20*: Phonebook database, step8
176
+
#### 3.20*: Phonebook database, step 8
177
177
178
178
Add validation to your phonebook application, which will make sure that phone numbers are of the correct form. A phone number must:
179
179
@@ -292,7 +292,7 @@ It is recommended to create a separate _npm script_ for linting:
292
292
293
293
Now the _npm run lint_ command will check every file in the project.
294
294
295
-
Also the files in the <em>dist</em> directory get checked when the command is run. We do not want this to happen, and we can accomplish this by creating an [.eslintignore](https://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories) file in the project's root with the following contents:
295
+
Also the files in the <em>dist</em> directory get checked when the command is run. We do not want this to happen, and we can accomplish this by creating an [.eslintignore](https://eslint.org/docs/latest/use/configure/ignore#the-eslintignore-file) file in the project's root with the following contents:
296
296
297
297
```bash
298
298
dist
@@ -355,7 +355,7 @@ Our default configuration takes a bunch of predetermined rules into use from <i>
355
355
'extends': 'eslint:recommended',
356
356
```
357
357
358
-
This includes a rule that warns about _console.log_ commands. [Disabling](https://eslint.org/docs/user-guide/configuring#configuring-rules) a rule can be accomplished by defining its "value" as 0 in the configuration file. Let's do this for the <i>no-console</i> rule in the meantime.
358
+
This includes a rule that warns about _console.log_ commands. [Disabling](https://eslint.org/docs/latest/use/configure/rules) a rule can be accomplished by defining its "value" as 0 in the configuration file. Let's do this for the <i>no-console</i> rule in the meantime.
359
359
360
360
```js
361
361
{
@@ -384,6 +384,7 @@ If there is something wrong in your configuration file, the lint plugin can beha
384
384
Many companies define coding standards that are enforced throughout the organization through the ESlint configuration file. It is not recommended to keep reinventing the wheel over and over again, and it can be a good idea to adopt a ready-made configuration from someone else's project into yours. Recently many projects have adopted the Airbnb [Javascript style guide](https://github.com/airbnb/javascript) by taking Airbnb's [ESlint](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb) configuration into use.
385
385
386
386
You can find the code for our current application in its entirety in the <i>part3-7</i> branch of [this GitHub repository](https://github.com/fullstack-hy2020/part3-notes-backend/tree/part3-7).
0 commit comments