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/0/en/part0a.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Participants are expected to have good programming skills, basic knowledge of we
19
19
20
20
Previous knowledge of JavaScript or other course topics is not required.
21
21
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.
23
23
24
24
### Course material
25
25
@@ -37,7 +37,7 @@ The course contains fourteen parts, the first of which is numbered 0 for consist
37
37
38
38
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.
39
39
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 asteriskmarked 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.
41
41
42
42
The speed of completing the course is flexible.
43
43
@@ -57,7 +57,7 @@ it is quite likely that nobody will respond. The bug can be *anywhere*.
57
57
58
58
A better question could be
59
59
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.
61
61
>
62
62
> The code looks like this
63
63
>
@@ -74,7 +74,7 @@ A better question could be
74
74
>
75
75
> The network tab looks like the following*
76
76
>
77
-
> [screen shot from the network console]
77
+
> [screenshot from the network console]
78
78
>
79
79
> All the code can be found here (a link to GitHub)
80
80
@@ -194,7 +194,7 @@ How to study the course – instructions in a nutshell: other course parts
194
194
195
195
### Submitting exercises
196
196
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).
198
198
199
199
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.
200
200
@@ -274,11 +274,11 @@ When pressed twice you should see the following text
274
274
275
275
**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).
276
276
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.
278
278
279
279
When the registration is done, the following text appears in the submission system
280
280
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*
282
282
283
283
### Where do I get my University of Helsinki Student number
284
284
@@ -302,11 +302,11 @@ After course enrollment, you will receive a confirmation email to an email addre
302
302
303
303
#### C) Contact Student Services
304
304
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!***
Copy file name to clipboardExpand all lines: src/content/10/en/part10c.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -471,7 +471,7 @@ Note that it is <i>never</i> a good idea to put sensitive data into the applicat
471
471
472
472
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>.
473
473
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.
Copy file name to clipboardExpand all lines: src/content/10/en/part10d.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -488,7 +488,7 @@ Now that we have a view for a single repository, let's display repository's revi
488
488
489
489
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>.
490
490
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:
Copy file name to clipboardExpand all lines: src/content/11/en/part11b.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -225,7 +225,7 @@ The [uses](https://docs.github.com/en/free-pro-team@latest/actions/reference/wor
225
225
226
226
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.
227
227
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.
Copy file name to clipboardExpand all lines: src/content/11/en/part11d.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -292,7 +292,7 @@ When using a third-party action such that <i>github-tag-action</i> it might be a
292
292
293
293
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.
294
294
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:
Copy file name to clipboardExpand all lines: src/content/2/fi/osa2c.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -465,7 +465,7 @@ const hook = () => {
465
465
useEffect(hook, [])
466
466
```
467
467
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
469
469
470
470
> <i>By default, effects run after every completed render, but you can choose to fire it only when certain values have changed.</i>
471
471
@@ -517,7 +517,7 @@ Sovelluksemme kokonaisuuden konfiguraatiosta on pikkuhiljaa muodostunut melko mo
517
517
518
518

519
519
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).
521
521
522
522
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>.
Copy file name to clipboardExpand all lines: src/content/3/en/part3a.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ Let's navigate to an appropriate directory, and create a new template for our ap
39
39
40
40
The file defines, for instance, that the entry point of the application is the <i>index.js</i> file.
41
41
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.
43
43
44
44
```bash
45
45
{
@@ -154,7 +154,7 @@ import http from 'http'
154
154
155
155
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).
156
156
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.
158
158
159
159
CommonJS modules function almost exactly like ES6 modules, at least as far as our needs in this course are concerned.
160
160
@@ -216,7 +216,7 @@ console.log(`Server running on port ${PORT}`)
216
216
217
217
Let's restart the server (you can shut the server down by pressing _Ctrl+C_ in the console) and let's refresh the browser.
218
218
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.
220
220
221
221
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:
222
222
@@ -340,7 +340,7 @@ The request is responded to with the [json](http://expressjs.com/en/4x/api.html#
340
340
341
341
Next, let's take a quick look at the data sent in JSON format.
342
342
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:
344
344
345
345
```js
346
346
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
950
950
951
951
### Middleware
952
952
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).
954
954
955
955
Middleware are functions that can be used for handling _request_ and _response_ objects.
Copy file name to clipboardExpand all lines: src/content/4/en/part4d.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -422,7 +422,7 @@ Modify adding new blogs so that it is only possible if a valid token is sent wit
422
422
423
423
[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>.
424
424
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.
426
426
427
427
In other words, if you register this middleware in the <i>app.js</i> file before all routes
0 commit comments