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: README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -458,22 +458,6 @@ line'}
458
458
- backticks are supported (`` BACKTICK_KEY=`This has 'single' and "double" quotes inside of it.` ``)
459
459
460
460
</details>
461
-
<details><summary>What about syncing and securing .env files?</summary><br/>
462
-
463
-
Use [dotenvx](https://github.com/dotenvx/dotenvx) to unlock syncing encrypted .env files over git.
464
-
465
-
</details>
466
-
<details><summary>What if I accidentally commit my `.env` file to code?</summary><br/>
467
-
468
-
Remove it, [remove git history](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository) and then install the [git pre-commit hook](https://github.com/dotenvx/dotenvx#pre-commit) to prevent this from ever happening again.
469
-
470
-
```
471
-
npm i -g @dotenvx/dotenvx
472
-
dotenvx precommit --install
473
-
```
474
-
475
-
</details>
476
-
477
461
<details><summary>How do I specify config options with ES6 import?</summary><br/>
478
462
479
463
When using `import 'dotenv/config'`, you can't pass options directly. Here are a few ways to handle it.
@@ -526,6 +510,22 @@ import express from 'express'
526
510
Not the most elegant, but it works reliably when hoisting gets in the way.
527
511
528
512
</details>
513
+
<details><summary>What about syncing and securing .env files?</summary><br/>
514
+
515
+
Use [dotenvx](https://github.com/dotenvx/dotenvx) to unlock syncing encrypted .env files over git.
516
+
517
+
</details>
518
+
<details><summary>What if I accidentally commit my `.env` file to code?</summary><br/>
519
+
520
+
Remove it, [remove git history](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository) and then install the [git pre-commit hook](https://github.com/dotenvx/dotenvx#pre-commit) to prevent this from ever happening again.
521
+
522
+
```
523
+
npm i -g @dotenvx/dotenvx
524
+
dotenvx precommit --install
525
+
```
526
+
527
+
</details>
528
+
529
529
<details><summary>What happens to environment variables that were already set?</summary><br/>
530
530
531
531
By default, we will never modify any environment variables that have already been set. In particular, if there is a variable in your `.env` file which collides with one that already exists in your environment, then that variable will be skipped.
0 commit comments