Skip to content

Commit 13f2cc3

Browse files
committed
Clarify advice about env variables
1 parent 4c08d3b commit 13f2cc3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/content/2/en/part2e.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,10 +622,10 @@ const api_key = import.meta.env.VITE_SOME_KEY
622622
// variable api_key now has the value set in startup
623623
```
624624
625-
Note that you will need to restart the server to apply the changes.
626-
627625
**NB:** To prevent accidentally leaking environment variables to the client, only variables prefixed with VITE_ are exposed to Vite.
628626
627+
Also remember that if you make changes to environment variables, you need to restart the development server for the changes to take effect.
628+
629629
This was the last exercise of this part of the course. It's time to push your code to GitHub and mark all of your finished exercises to the [exercise submission system](https://studies.cs.helsinki.fi/stats/courses/fullstackopen).
630630
631631
</div>

src/content/2/fi/osa2e.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,9 @@ const api_key = import.meta.env.VITE_SOME_KEY
621621
// muuttujassa api_key on nyt käynnistyksessä annettu API-avaimen arvo
622622
```
623623
624-
Huomaa, että ympäristömuuttujan nimen täytyy alkaa merkkijonolla <i>VITE_</i>.
624+
Huomaa, että ympäristömuuttujan nimen täytyy alkaa merkkijonolla <i>VITE_</i>.
625+
626+
Muista myös, että jos teet muutoksia ympäristömuuttujiin, sinun on käynnistettävä kehityspalvelin uudelleen, jotta muutokset tulevat voimaan.
625627
626628
Tämä oli osan viimeinen tehtävä ja on aika sekä puskea koodi GitHubiin että merkitä tehdyt tehtävät [palautussovellukseen](https://studies.cs.helsinki.fi/stats/courses/fullstackopen).
627629

0 commit comments

Comments
 (0)