Skip to content

Commit 61cda7c

Browse files
committed
Merge branch 'source' into part6-spanish
2 parents 892c19f + b6026a1 commit 61cda7c

File tree

13 files changed

+31
-30
lines changed

13 files changed

+31
-30
lines changed

src/content/0/en/part0a.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Participants are expected to have good programming skills, basic knowledge of we
1919

2020
Previous knowledge of JavaScript or other course topics is not required.
2121

22-
How much programming experience is needed? It is hard to say, but you should be pretty fluent with *your* language. This level of fluency takes usually at least 100-200 hours of practice to develop.
22+
How much programming experience is needed? It is hard to say, but you should be pretty fluent in *your* language. This level of fluency takes usually at least 100-200 hours of practice to develop.
2323

2424
### Course material
2525

@@ -37,7 +37,7 @@ The course contains fourteen parts, the first of which is numbered 0 for consist
3737

3838
Proceeding from part *n* to part *n+1* is not sensible before enough know-how of the topics in part *n* has been achieved. In pedagogic terms, the course uses [Mastery Learning](https://en.wikipedia.org/wiki/Mastery_learning), and you are only intended to proceed to the next part after doing enough of the exercises of the previous part.
3939

40-
In parts 1-4 you are expected to do at least **all** of the exercises that are **not** marked with an asterisk(*). Exercises marked with an asterisk count towards your final grade, but skipping them does not prevent you from doing the compulsory exercises in the next parts. Parts 5-13 do not have asterisk marked exercises since there is no similar dependency on previous parts.
40+
In parts 1-4 you are expected to do at least **all** of the exercises that are **not** marked with an asterisk(*). Exercises marked with an asterisk count towards your final grade, but skipping them does not prevent you from doing the compulsory exercises in the next parts. Parts 5-13 do not have asterisk-marked exercises since there is no similar dependency on previous parts.
4141

4242
The speed of completing the course is flexible.
4343

@@ -57,7 +57,7 @@ it is quite likely that nobody will respond. The bug can be *anywhere*.
5757

5858
A better question could be
5959

60-
> * In the exercise 2.15 when I try to add a new person to the app, server responds to 403, despite the request looks ok to me.
60+
> * In exercise 2.15 when I try to add a new person to the app, the server responds to 403, despite the request looking ok to me.
6161
>
6262
> The code looks like this
6363
>
@@ -74,7 +74,7 @@ A better question could be
7474
>
7575
> The network tab looks like the following*
7676
>
77-
> [screen shot from the network console]
77+
> [screenshot from the network console]
7878
>
7979
> All the code can be found here (a link to GitHub)
8080
@@ -194,7 +194,7 @@ How to study the course – instructions in a nutshell: other course parts
194194
195195
### Submitting exercises
196196
197-
The exercises are submitted through GitHub and marking them as done on the "my submissions" tab of the [submission application](https://studies.cs.helsinki.fi/stats/courses/fullstackopen).
197+
The exercises are submitted through GitHub and marked as done on the "my submissions" tab of the [submission application](https://studies.cs.helsinki.fi/stats/courses/fullstackopen).
198198
199199
If you are submitting exercises from different parts to the same repository, use an appropriate system for naming your directories. You can of course create a new repository for each part. If you are using a private repository, add *mluukkai* as a collaborator.
200200
@@ -274,11 +274,11 @@ When pressed twice you should see the following text
274274
275275
**Please note** that to get university credits you need a registration for each completed part. Please see [more information about registration](/en/part0/general_info#parts-and-completion).
276276
277-
You can view your grade in University of Helsinki Sisu and [Opintopolku](https://opintopolku.fi/oma-opintopolku/) approximately four weeks after notifying us.
277+
You can view your grade in the University of Helsinki Sisu and [Opintopolku](https://opintopolku.fi/oma-opintopolku/) approximately four weeks after notifying us.
278278
279279
When the registration is done, the following text appears in the submission system
280280
281-
> *University credits registered, see the course page how to get a transcript if you need one*
281+
> *University credits registered, see the course page for how to get a transcript if you need one*
282282
283283
### Where do I get my University of Helsinki Student number
284284
@@ -302,11 +302,11 @@ After course enrollment, you will receive a confirmation email to an email addre
302302
303303
#### C) Contact Student Services
304304
305-
If you have trouble finding your student number through the means listed above, you can send an email to University of Helsinki Student Services. ***Make sure you have enrolled in the course through the Open University before sending the email!***
305+
If you have trouble finding your student number through the means listed above, you can send an email to the University of Helsinki Student Services. ***Make sure you have enrolled in the course through the Open University before sending the email!***
306306
307307
In your email, include the following information
308308
309-
- name of the course you have enrolled in,
309+
- the name of the course you have enrolled in,
310310
- your name
311311
- your date of birth.
312312

src/content/10/en/part10c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ Note that it is <i>never</i> a good idea to put sensitive data into the applicat
471471

472472
Instead of the hardcoded Apollo Server's URL, use an environment variable defined in the <i>.env</i> file when initializing the Apollo Client. You can name the environment variable for example <em>APOLLO_URI</em>.
473473

474-
<i>Do not</i> try to access environment variables like <em>process.env.APOLLO_URI</em> outside the <i>app.config.js</i> file. Instead use the <em>Constants.manifest.extra</em> object like in the previous example. In addition, do not import the dotenv library outside the <i>app.config.js</i> file or you will most likely face errors.
474+
<i>Do not</i> try to access environment variables like <em>process.env.APOLLO_URI</em> outside the <i>app.config.js</i> file. Instead use the <em>Constants.expoConfig.extra</em> object like in the previous example. In addition, do not import the dotenv library outside the <i>app.config.js</i> file or you will most likely face errors.
475475

476476
</div>
477477

src/content/10/en/part10d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ Now that we have a view for a single repository, let's display repository's revi
488488

489489
Review's <em>text</em> field contains the textual review, <em>rating</em> field a numeric rating between 0 and 100, and <em>createdAt</em> the date when the review was created. Review's <em>user</em> field contains the reviewer's information, which is of type <em>User</em>.
490490

491-
We want to display reviews as a scrollable list, which makes [FlatList](https://reactnative.dev/docs/flatlist) a suitable component for the job. To display the previous exercise's repository's information at the top of the list, you can use the <em>FlatList</em> components [ListHeaderComponent](https://reactnative.dev/docs/flatlist#listheadercomponent) prop. You can use the [ItemSeparatorComponent](https://reactnative.dev/docs/flatlist#itemseparatorcomponent) to add some space between the items like in the <em>RepositoryList</em> component. Here's an example of the structure:
491+
We want to display reviews as a scrollable list, which makes [FlatList](https://reactnative.dev/docs/flatlist) a suitable component for the job. To display the previous exercise's repository's information at the top of the list, you can use the <em>FlatList</em> component's [ListHeaderComponent](https://reactnative.dev/docs/flatlist#listheadercomponent) prop. You can use the [ItemSeparatorComponent](https://reactnative.dev/docs/flatlist#itemseparatorcomponent) to add some space between the items like in the <em>RepositoryList</em> component. Here's an example of the structure:
492492

493493
```javascript
494494
const RepositoryInfo = ({ repository }) => {

src/content/11/en/part11b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ The [uses](https://docs.github.com/en/free-pro-team@latest/actions/reference/wor
225225
226226
Here we're using a public action [actions/checkout](https://github.com/actions/checkout) and we specify a version (<code>@v4</code>) to avoid potential breaking changes if the action gets updated. The <code>checkout</code> action does what the name implies: it checkouts the project source code from Git.
227227
228-
Secondly, as the application is written in JavaScript, Node.js must be set up to be able to utilize the commands that are specified in <code>package.json</code>. To set up Node.js, [actions/setup-node](https://github.com/actions/setup-node) action can be used. Version <code>16</code> is selected because it is the version the application is using in the production environment.
228+
Secondly, as the application is written in JavaScript, Node.js must be set up to be able to utilize the commands that are specified in <code>package.json</code>. To set up Node.js, [actions/setup-node](https://github.com/actions/setup-node) action can be used. Version <code>20</code> is selected because it is the version the application is using in the production environment.
229229
230230
```yml
231231
# name and trigger not shown anymore...

src/content/11/en/part11d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ When using a third-party action such that <i>github-tag-action</i> it might be a
292292
293293
However, the code in a commit with a particular hash does not change in any circumstances, so if we want to be 100% sure about the code we use, it is safest to use the hash.
294294
295-
V ersion [1.61.0](https://github.com/anothrNick/github-tag-action/releases/tag/1.61.0) of the action corresponds to a commit with hash <code>8c8163ef62cf9c4677c8e800f36270af27930f42</code>, so we might want to change our configuration as follows:
295+
Version [1.61.0](https://github.com/anothrNick/github-tag-action/releases/tag/1.61.0) of the action corresponds to a commit with hash <code>8c8163ef62cf9c4677c8e800f36270af27930f42</code>, so we might want to change our configuration as follows:
296296
297297
```js
298298
- name: Bump version and push tag

src/content/2/fi/osa2c.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ const hook = () => {
465465
useEffect(hook, [])
466466
```
467467

468-
Nyt huomaamme selvemmin, että funktiolle [useEffect]((https://react.dev/reference/react/useEffect) annetaan <i>kaksi parametria</i>. Näistä ensimmäinen on funktio eli itse <i>efekti</i>. Dokumentaation mukaan
468+
Nyt huomaamme selvemmin, että funktiolle [useEffect](https://react.dev/reference/react/useEffect) annetaan <i>kaksi parametria</i>. Näistä ensimmäinen on funktio eli itse <i>efekti</i>. Dokumentaation mukaan
469469

470470
> <i>By default, effects run after every completed render, but you can choose to fire it only when certain values have changed.</i>
471471
@@ -517,7 +517,7 @@ Sovelluksemme kokonaisuuden konfiguraatiosta on pikkuhiljaa muodostunut melko mo
517517

518518
![](../../images/2/18e.png)
519519

520-
React-sovelluksen muodostavaa JavaScript-koodia siis suoritetaan selaimessa. Selain hakee JavaScriptin <i>React Development Serveriltä</i>, joka on se ohjelma, joka käynnistyy kun suoritetaan komento <em>npm start</em>. Development Server muokkaa sovelluksen JavaScriptin selainta varten sopivaan muotoon, se mm. yhdistelee eri tiedostoissa olevan JavaScript-koodin yhdeksi tiedostoksi. Puhumme enemmän Development Serveristä kurssin [osassa 7](/osa7).
520+
React-sovelluksen muodostavaa JavaScript-koodia siis suoritetaan selaimessa. Selain hakee JavaScriptin <i>React Development Serveriltä</i>, joka on se ohjelma, joka käynnistyy kun suoritetaan komento <em>npm run dev</em>. Development Server muokkaa sovelluksen JavaScriptin selainta varten sopivaan muotoon, se mm. yhdistelee eri tiedostoissa olevan JavaScript-koodin yhdeksi tiedostoksi. Puhumme enemmän Development Serveristä kurssin [osassa 7](/osa7).
521521

522522
JSON-muodossa olevan datan selaimessa pyörivä React-sovellus hakee siis koneella portissa 3001 käynnissä olevalta JSON Serveriltä, joka taas saa JSON-datan tiedostosta <i>db.json</i>.
523523

src/content/3/en/part3a.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Let's navigate to an appropriate directory, and create a new template for our ap
3939

4040
The file defines, for instance, that the entry point of the application is the <i>index.js</i> file.
4141

42-
Let's make a small change to the <i>scripts</i> object:
42+
Let's make a small change to the <i>scripts</i> object by adding a new script command.
4343

4444
```bash
4545
{
@@ -154,7 +154,7 @@ import http from 'http'
154154

155155
These days, code that runs in the browser uses ES6 modules. Modules are defined with an [export](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) and taken into use with an [import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import).
156156

157-
Node.js uses by default so-called [CommonJS](https://en.wikipedia.org/wiki/CommonJS) modules. The reason for this is that the Node ecosystem needed modules long before JavaScript supported them in the language specification. Currently, Node also supports the use of ES6 modules, but since the support is not quite perfect yet, we'll stick to CommonJS modules.
157+
Node.js uses [CommonJS](https://en.wikipedia.org/wiki/CommonJS) modules. The reason for this is that the Node ecosystem needed modules long before JavaScript supported them in the language specification. Currently, Node also supports the use of ES6 modules, but since the support is not quite perfect yet, we'll stick to CommonJS modules.
158158

159159
CommonJS modules function almost exactly like ES6 modules, at least as far as our needs in this course are concerned.
160160

@@ -216,7 +216,7 @@ console.log(`Server running on port ${PORT}`)
216216

217217
Let's restart the server (you can shut the server down by pressing _Ctrl+C_ in the console) and let's refresh the browser.
218218

219-
The <i>application/json</i> value in the <i>Content-Type</i> header informs the receiver that the data is in the JSON format. The _notes_ array gets transformed into JSON with the <em>JSON.stringify(notes)</em> method.
219+
The <i>application/json</i> value in the <i>Content-Type</i> header informs the receiver that the data is in the JSON format. The _notes_ array gets transformed into JSON formatted string with the <em>JSON.stringify(notes)</em> method. This is necessary because the response.end() method expects a string or a buffer to send as the response body.
220220

221221
When we open the browser, the displayed format is exactly the same as in [part 2](/en/part2/getting_data_from_server/) where we used [json-server](https://github.com/typicode/json-server) to serve the list of notes:
222222

@@ -340,7 +340,7 @@ The request is responded to with the [json](http://expressjs.com/en/4x/api.html#
340340

341341
Next, let's take a quick look at the data sent in JSON format.
342342

343-
In the earlier version where we were only using Node, we had to transform the data into the JSON format with the _JSON.stringify_ method:
343+
In the earlier version where we were only using Node, we had to transform the data into the JSON formatted string with the _JSON.stringify_ method:
344344

345345
```js
346346
response.end(JSON.stringify(notes))
@@ -950,7 +950,7 @@ POST is the only HTTP request type that is neither <i>safe</i> nor <i>idempotent
950950

951951
### Middleware
952952

953-
The express [json-parser](https://expressjs.com/en/api.html) we took into use earlier is a so-called [middleware](http://expressjs.com/en/guide/using-middleware.html).
953+
The express [json-parser](https://expressjs.com/en/api.html) used earlier is a [middleware](http://expressjs.com/en/guide/using-middleware.html).
954954

955955
Middleware are functions that can be used for handling _request_ and _response_ objects.
956956

src/content/3/en/part3c.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,8 @@ app.get('/api/notes', (request, response) => {
435435

436436
The code automatically uses the defined _toJSON_ when formatting notes to the response.
437437

438-
### Database configuration into its own module
438+
### Moving db configuration to its own module
439+
439440

440441
Before we refactor the rest of the backend to use the database, let's extract the Mongoose-specific code into its own module.
441442

src/content/3/fi/osa3a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ Pyyntöön vastataan _response_-olion metodilla [json](http://expressjs.com/en/4
337337

338338
Pieni huomio JSON-muodossa palautettavasta datasta.
339339

340-
Aiemmassa, pelkkää Nodea käyttämässä versiossa, jouduimme muuttamaan palautettavan datan JSON-muotoon metodilla _JSON.stringify_:
340+
Aiemmassa, pelkkää Nodea käyttävässä versiossa, jouduimme muuttamaan palautettavan datan JSON-muotoon metodilla _JSON.stringify_:
341341

342342
```js
343343
response.end(JSON.stringify(notes))

src/content/4/en/part4d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ Modify adding new blogs so that it is only possible if a valid token is sent wit
422422

423423
[This example](/en/part4/token_authentication#limiting-creating-new-notes-to-logged-in-users) from part 4 shows taking the token from the header with the _getTokenFrom_ helper function in <i>controllers/blogs.js</i>.
424424

425-
If you used the same solution, refactor taking the token to a [middleware](/en/part3/node_js_and_express#middleware). The middleware should take the token from the <i>Authorization</i> header and place it into the <i>token</i> field of the <i>request</i> object.
425+
If you used the same solution, refactor taking the token to a [middleware](/en/part3/node_js_and_express#middleware). The middleware should take the token from the <i>Authorization</i> header and assign it to the <i>token</i> field of the <i>request</i> object.
426426

427427
In other words, if you register this middleware in the <i>app.js</i> file before all routes
428428

0 commit comments

Comments
 (0)