Skip to content

Commit d84421a

Browse files
committed
right mongoose
1 parent c9fdff7 commit d84421a

File tree

7 files changed

+11
-31
lines changed

7 files changed

+11
-31
lines changed

src/content/3/en/part3c.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,12 @@ We could use the database directly from our JavaScript code with the [official M
121121

122122
Mongoose could be described as an <i>object document mapper</i> (ODM), and saving JavaScript objects as Mongo documents is straightforward with this library.
123123

124-
Let's install Mongoose (version 6.12.2) in our notes project backend:
124+
Let's install Mongoose in our notes project backend:
125125

126126
```bash
127-
npm install mongoose@6.12.2
127+
npm install mongoose
128128
```
129129

130-
At the moment we need to use a bit older version of Mongoose since the most recent (version 8.0) is not supported by a library that we will be using during the course.
131-
132130
Let's not add any code dealing with Mongo to our backend just yet. Instead, let's make a practice application by creating a new file, <i>mongo.js</i> in the root of the notes backend application:
133131

134132
```js
@@ -284,14 +282,6 @@ Note.find({ important: true }).then(result => {
284282

285283
### Exercise 3.12.
286284

287-
**Note** You should install Mongoose version 6.12.2 with the command
288-
289-
```bash
290-
npm install [email protected]
291-
```
292-
293-
since the most recent Mongoose version does not support a library that we will be using in a later part of the course!
294-
295285
#### 3.12: Command-line database
296286

297287
Create a cloud-based MongoDB database for the phonebook application with MongoDB Atlas.

src/content/3/fi/osa3c.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,12 @@ Voisimme käyttää kantaa JavaScript-koodista suoraan Mongon virallisen [MongoD
117117

118118
Mongoosesta voisi käyttää luonnehdintaa <i>object document mapper</i> (ODM), ja sen avulla JavaScript-olioiden tallettaminen MongoDB:n dokumenteiksi on suoraviivaista.
119119

120-
Asennetaan Mongoosen versio 6.12.2:
120+
Asennetaan Mongoose:
121121

122122
```bash
123-
npm install mongoose@6.12.2
123+
npm install mongoose
124124
```
125125

126-
Joudumme käyttämään hieman vanhempaa versiota uusin Mongoose-versio (8.0) ei tue kirjastoa, jota tulemme käyttämään kurssin myöhemmässä osassa!
127-
128126
Ei lisätä MongoDB:tä käsittelevää koodia heti backendin koodin sekaan, vaan tehdään erillinen kokeilusovellus tiedostoon <i>mongo.js</i>:
129127

130128
```js
@@ -276,14 +274,6 @@ Note.find({ important: true }).then(result => {
276274

277275
### Tehtävä 3.12
278276

279-
**HUOM** Asenna Mongoosesta versio 6.12.2 komennolla
280-
281-
```bash
282-
npm install [email protected]
283-
```
284-
285-
Joudumme käyttämään hieman vanhempaa versiota uusin Mongoose-versio ei tue kirjastoa, jota tulemme käyttämään kurssin myöhemmässä osassa!
286-
287277
#### 3.12: tietokanta komentoriviltä
288278

289279
Luo puhelinluettelosovellukselle pilvessä oleva MongoDB-tietokanta Mongo DB Atlaksen avulla.

src/content/4/en/part4a.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,10 @@ The nature of VS Code bleeding into how you write your code is probably not idea
409409
410410
In the exercises for this part, we will be building a <i>blog list application</i>, that allows users to save information about interesting blogs they have stumbled across on the internet. For each listed blog we will save the author, title, URL, and amount of upvotes from users of the application.
411411
412-
**Note** You should install Mongoose version 6.12.2 with the command
412+
**Note** You should install Mongoose version 7.6.5 with the command
413413
414414
```bash
415-
npm install mongoose@6.12.2
415+
npm install mongoose@7.6.5
416416
```
417417
418418
since the most recent Mongoose version does not support a library that we will be using in a later part of the course!

src/content/4/en/part4c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ Note: when installing the _mongoose-unique-validator_ library, you may encounter
386386
The reason for this is that at the time of writing (10.11.2023) the library is not yet compatible with Mongoose version 8. If you encounter this error, you can revert to an older version of Mongoose by running the command
387387

388388
```
389-
npm install mongoose@6.12.2
389+
npm install mongoose@7.6.5
390390
```
391391

392392
We could also implement other validations into the user creation. We could check that the username is long enough, that the username only consists of permitted characters, or that the password is strong enough. Implementing these functionalities is left as an optional exercise.

src/content/4/fi/osa4a.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,10 @@ Eli eksportoitava asia (tässä tilanteessa router-olio) sijoitetaan muuttujaan
397397
398398
Rakennamme tämän osan tehtävissä <i>blogilistasovellusta</i>, jonka avulla käyttäjien on mahdollista tallettaa tietoja Internetistä löytämistään mielenkiintoisista blogeista. Kustakin blogista talletetaan sen kirjoittaja (author), aihe (title), url sekä blogilistasovelluksen käyttäjien antamien äänien määrä.
399399
400-
**HUOM** Asenna Mongoosesta versio 6.12.2 komennolla
400+
**HUOM** Asenna Mongoosesta versio 7.6.5 komennolla
401401
402402
```bash
403-
npm install mongoose@6.12.2
403+
npm install mongoose@7.6.5
404404
```
405405
406406
Joudumme käyttämään hieman vanhempaa versiota uusin Mongoose-versio ei tue kirjastoa, jota tulemme käyttämään kurssin myöhemmässä osassa!

src/content/4/fi/osa4c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ Huom: asentaessasi kirjastoa _mongoose-unique-validator_ saatat törmätä seura
387387
Syynä tälle on se, että kirjasto ei ole kirjoitushetkellä (10.11.2023) vielä yhteensopiva Mongoosen version 8 kanssa. Jos törmäät virheeseen, voit ottaa käyttöösi Mongoosen vanhemman version suorittamalla komennon
388388

389389
```
390-
npm install mongoose@6.12.2
390+
npm install mongoose@7.6.5
391391
```
392392

393393
This will install the _mongoose-unique-validator_ library.

src/content/4/ptbr/part4c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ Nota: ao instalar a biblioteca mongoose-unique-validator, você pode encontrar a
386386
A razão para isso é que a biblioteca ainda não é compatível com a versão 7 do Mongoose no momento da redação (13 de março de 2023). Se você encontrar um erro, poderá fazer o downgrade para uma versão mais antiga do Mongoose executando o comando
387387

388388
```js
389-
npm install mongoose@6
389+
npm install mongoose@7.6.5
390390
```
391391

392392
Depois disso, você pode instalar a biblioteca mongoose-unique-validator sem problemas.

0 commit comments

Comments
 (0)