Skip to content

Commit 9962f53

Browse files
committed
Fix instructions about node_modules folder and .gitignore
1 parent 7149217 commit 9962f53

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/content/3/en/part3a.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,9 +743,9 @@ What exactly is happening in that line of code? <em>notes.map(n => Number(n.id))
743743

744744
### Exercises 3.1.-3.6.
745745

746-
**NB:** Because this is not a frontend project and we are not working with React, the application <strong>is not created</strong> with create vite@latest -- --template react. You initialize this project with the <em>npm init</em> command that was demonstrated earlier in this part of the material.
746+
**NB:** Since this is not about the frontend and React, the application is <strong>not created</strong> with Vite, but with the <em>npm init</em> command, as described earlier in this part of the material.
747747

748-
**NB:** Because the "node\_modules" is created using "npm install express", it will not be excluded when you are trying to add your code to git using "git add .", therefore please create a file called ".gitignore" and write "node\_modules" so that git ignores it everytime you try to add, commit or push to a remote repo.
748+
Do not add the *node_modules* directory to version control. The _npm init_ command does not automatically create a <i>.gitignore</i> file, so create one in the root of your project and add the line *node_modules* to it. This way Git will no longer track that directory in version control.
749749

750750
**Strong recommendation:** When you are working on backend code, always keep an eye on what's going on in the terminal that is running your application.
751751

src/content/3/fi/osa3a.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ Mitä rivillä tapahtuu? <em>notes.map(n => Number(n.id))</em> muodostaa tauluko
717717

718718
**HUOM:** Koska nyt ei ole kyse frontendista ja Reactista, sovellusta <strong>ei luoda</strong> Vitellä vaan komennolla <em>npm init</em>, kuten ylempänä tämän osan materiaalissa.
719719

720+
Älä lisää *node_modules*-kansiota verionhallintaan. Komento _npm init_ ei luo automaattisesti <i>.gitignore</i>-tiedostoa, joten luo sellainen projektin juureen ja lisää sinne rivi *node_modules*. Näin git ei enää huomioi kyseistä kansiota versionhallinnassa.
720721

721722
**Vahva suositus:** kun teet backendin koodia, pidä koko ajan silmällä, mitä palvelimen koodia suorittavassa konsolissa tapahtuu.
722723

0 commit comments

Comments
 (0)