Is the express .env exercise correct?
See original GitHub issueDescription
Extract from the exercise:
The .env file is a hidden file that is used to pass environment variables to your application. ā¦
We write a .env
file holding a VAR=something. We can console log this variable, by running āRunā in a repl.it file.
But this is not the standard Node.js behavior. npm start
or node server.js
wonāt load any variable unless we include the dotenv
package. So If any user tries to emulate that project locally, it wonāt work the same.
I may be missing something simple, but just find it strange, and asking in repl.it didnāt help much so far.
Add a Link to the page with the problem:
Because itās a hidden file the only way is to build it yourself. A way is to create a new repl.it and a .env
file, then console logging the value.
Directory Tree Image
Issue Analytics
- State:
- Created 3 years ago
- Comments:32 (26 by maintainers)
Top GitHub Comments
@RandellDawson I think thatās probably the best approach. š
Just do