File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ console.log(process.env) // remove this after you've confirmed it is working
3434
3535That's it. ` process.env ` now has the keys and values you defined in your ` .env ` file:
3636
37+ ``` sh
38+ $ node index.js
39+ ◇ injecting env (14) from .env
40+ ```
41+
3742  ;
3843
3944## Advanced
Original file line number Diff line number Diff line change @@ -29,13 +29,19 @@ SECRET_KEY="YOURSECRETKEYGOESHERE"
2929And as early as possible in your application, import and configure dotenv:
3030
3131``` javascript
32+ // index.js
3233require (' dotenv' ).config () // or import 'dotenv/config' if you're using ES6
3334...
3435console .log (process .env ) // remove this after you've confirmed it is working
3536```
3637
3738That's it. ` process.env ` now has the keys and values you defined in your ` .env ` file:
3839
40+ ``` sh
41+ $ node index.js
42+ ◇ injecting env (14) from .env
43+ ```
44+
3945  ;
4046
4147## Advanced
You can’t perform that action at this time.
0 commit comments