Skip to content

Commit a9b81a9

Browse files
committed
part 3d
1 parent 15f00b8 commit a9b81a9

File tree

2 files changed

+100
-143
lines changed

2 files changed

+100
-143
lines changed

src/content/3/en/part3d.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ When the app is being developed, it is more than likely that something fails. Eg
123123

124124
![browser showing no notes appearing](../../images/3/fly-problem1.png)
125125

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.
127127

128128
The browser console has to be open <i>all the time!</i>
129129

@@ -135,11 +135,11 @@ The database url was _undefined_, so the command *fly secrets set MONGODB\_URI*
135135

136136
When using Render, the database url is given by defining the proper env in the dashboard:
137137

138-
![browser render showing the MONGODB_URI env variable](../../images/3/render-env.png)
138+
![render dashboard showing the MONGODB_URI env variable](../../images/3/render-env.png)
139139

140140
The Render Dashboard shows the server logs:
141141

142-
![render dashboard with arrow pointting to server running on port 10000](../../images/3/r7.png)
142+
![render dashboard with arrow pointing to server running on port 10000](../../images/3/r7.png)
143143

144144
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).
145145

@@ -149,7 +149,7 @@ You can find the code for our current application in its entirety in the <i>part
149149

150150
### Exercises 3.19.-3.21.
151151

152-
#### 3.19*: Phonebook database, step7
152+
#### 3.19*: Phonebook database, step 7
153153

154154
Expand the validation so that the name stored in the database has to be at least three characters long.
155155

@@ -173,7 +173,7 @@ You can display the default error message returned by Mongoose, even though they
173173

174174
**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.
175175

176-
#### 3.20*: Phonebook database, step8
176+
#### 3.20*: Phonebook database, step 8
177177

178178
Add validation to your phonebook application, which will make sure that phone numbers are of the correct form. A phone number must:
179179

@@ -292,7 +292,7 @@ It is recommended to create a separate _npm script_ for linting:
292292

293293
Now the _npm run lint_ command will check every file in the project.
294294

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:
296296

297297
```bash
298298
dist
@@ -355,7 +355,7 @@ Our default configuration takes a bunch of predetermined rules into use from <i>
355355
'extends': 'eslint:recommended',
356356
```
357357

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.
359359

360360
```js
361361
{
@@ -384,6 +384,7 @@ If there is something wrong in your configuration file, the lint plugin can beha
384384
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.
385385

386386
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).
387+
387388
</div>
388389

389390
<div class="tasks">

0 commit comments

Comments
 (0)