Skip to content

Commit a86d161

Browse files
committed
Merge branch 'source' into spanish-small-updates
2 parents d47800c + c7192b7 commit a86d161

File tree

8 files changed

+27
-7
lines changed

8 files changed

+27
-7
lines changed

src/content/11/en/part11c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ app.get('/health', (req, res) => {
212212

213213
Configure then an [HTTP check](https://fly.io/docs/reference/configuration/#http_service-checks) that ensures the health of the deployments based on the HTTP request to the defined health check endpoint.
214214

215-
You also need to set the [deployment strategy](https://fly.io/docs/reference/configuration/#picking-a-deployment-strategy) (in the file _fly.toml_) of the app to be either <i>canary</i> or <i>bluegreen</i>. These strategies ensure that only an app with a healthy state gets deployed.
215+
You also need to set the [deployment strategy](https://fly.io/docs/reference/configuration/#picking-a-deployment-strategy) (in the file _fly.toml_) of the app to be <i>canary</i>. These strategies ensure that only an app with a healthy state gets deployed.
216216

217217
Ensure that GitHub Actions notices if a deployment breaks your application:
218218

src/content/3/en/part3d.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ It is also vital to follow continuously the server logs. The problem became obvi
133133

134134
The database url was _undefined_, so the command *fly secrets set MONGODB\_URI* was forgotten.
135135

136+
You will also need to whitelist the the fly.io app's IP address in MongoDB Atlas. If you don't MongoDB will refuse the connection.
137+
138+
Sadly, fly.io does not provide you a dedicated IPv4 address for your app, so you will need to allow all IP addresses in MongoDB Atlas.
139+
136140
When using Render, the database url is given by defining the proper env in the dashboard:
137141

138142
![render dashboard showing the MONGODB_URI env variable](../../images/3/render-env.png)

src/content/4/en/part4d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ const errorHandler = (error, request, response, next) => {
227227
} else if (error.name === 'MongoServerError' && error.message.includes('E11000 duplicate key error')) {
228228
return response.status(400).json({ error: 'expected `username` to be unique' })
229229
} else if (error.name === 'JsonWebTokenError') { // highlight-line
230-
return response.status(400).json({ error: 'token missing or invalid' }) // highlight-line
230+
return response.status(401).json({ error: 'token invalid' }) // highlight-line
231231
}
232232

233233
next(error)

src/content/6/en/part6b.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,22 @@ Also, start using Redux DevTools to debug the application's state easier.
713713
714714
Change also the definition of the <i>anecdote reducer and action creators</i> to use the Redux Toolkit's <em>createSlice</em> function.
715715
716+
Implementation note: when you use the Redux Toolkit to return the initial state of anecdotes, it will be immutable, so you will need to make a copy of it to sort it, or you will encounter "TypeError: Cannot assign to read only property '". You can use the spread syntax to make a copy of the array. Instead of:
717+
718+
```js
719+
720+
anecdotes.sort()
721+
722+
```
723+
724+
Write:
725+
726+
```js
727+
728+
[...anecdotes].sort()
729+
730+
```
731+
716732
#### 6.12 Better Anecdotes, step 10
717733
718734
The application has a ready-made body for the <i>Notification</i> component:

src/content/8/fi/osa8c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Mutation: {
292292
throw new GraphQLError('Creating the user failed', {
293293
extensions: {
294294
code: 'BAD_USER_INPUT',
295-
invalidArgs: args.name,
295+
invalidArgs: args.username,
296296
error
297297
}
298298
})

src/content/8/fi/osa8d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const App = () => {
161161

162162
Backendin muutosten jälkeen uusien henkilöiden lisäys puhelinluetteloon vaatii sen, että käyttäjän token lähetetään pyynnön mukana.
163163

164-
Tämä edellyttää pientä muutosta tiedostossa <i>index.js</i> olevaan ApolloClient-olion konfiguraatioon
164+
Tämä edellyttää pientä muutosta tiedostossa <i>main.jsx</i> olevaan ApolloClient-olion konfiguraatioon
165165

166166
```js
167167
import { ApolloClient, InMemoryCache, ApolloProvider, createHttpLink } from '@apollo/client' // highlight-line

src/content/8/fi/osa8e.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ subscription Subscription {
638638
}
639639
```
640640

641-
Kun tilauksen suorittavaa sinistä PersonAdded-painiketta painetaan, jää Explorer odottamaan tilaukseen tulevia vastauksia. Aina kun sovellukseen lisätään uusia käyttäjiä (joudut tekemään lisäyksen frontendista tai toisesta selainikkunasta), tulee tieto niistä Explorerin oikeaan reunaan.
641+
Kun tilauksen suorittavaa sinistä PersonAdded-painiketta painetaan, jää Explorer odottamaan tilaukseen tulevia vastauksia. Aina kun sovellukseen lisätään uusia henkilöitä (joudut tekemään lisäyksen frontendista tai toisesta selainikkunasta), tulee tieto niistä Explorerin oikeaan reunaan.
642642

643643
Jos tilaus ei toimi, tarkasta, että yhteysasetukset on määritelty oikein:
644644

src/content/9/en/part9b.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ Let's install ESlint and its TypeScript extensions:
895895
npm install --save-dev eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser
896896
```
897897
898-
We will configure ESlint to [disallow explicit any]( https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-explicit-any.md). Write the following rules to *.eslintrc*:
898+
We will configure ESlint to [disallow explicit any]( https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-explicit-any.md). Write the following rules to *.eslintrc.json*:
899899
900900
```json
901901
{
@@ -937,7 +937,7 @@ For now, we should probably go with the recommended settings, and we will modify
937937
938938
On top of the recommended settings, we should try to get familiar with the coding style required in this part and *set the semicolon at the end of each line of code to be required*.
939939
940-
So we will use the following *.eslintrc*
940+
So we will use the following *.eslintrc.json*
941941
942942
```json
943943
{

0 commit comments

Comments
 (0)