process.env
See original GitHub issueIssue
Description
Using process.env
is not great as the used env variables seem to be not declared anywhere. We should use cross-env
for testing purposes and use some config for setting them instead of using process.env
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
process.env: What it is and why/when/how to use it effectively
The process.env global variable is injected by the Node at runtime for your application to use and it represents the state of the...
Read more >Working with Environment Variables in Node.js - Twilio
When your Node.js process boots up, it'll automatically provide access to all existing environment variables by creating an env object ...
Read more >Node.js process.env Property - GeeksforGeeks
The process.env property is an inbuilt application programming interface of the process module which is used to get the user environment.
Read more >Node Environment Variables: Process env Node
In Node.js, process.env is a global variable injected during runtime. It is a view of the state of the system environment variables. When...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think we should have a
.env
committed into the repo.https://www.npmjs.com/package/dotenv#should-i-commit-my-env-file
Is there a reason why those links are set using environment variables (slack etc.)? I don’t think those should be set by the environment.
If anything, you could set default values if the environment variables aren’t detected. We can have a sample
.env
file that developers can use to write their own and include instructions in the repo. But environment variables should be for things like… theCODING_COACH_API
url, or whatever client API keys we’re using (like the Google Analytics example).Just my two cents! 🤷♂️
Exactly. dot-env are normally meant for credentials and user specific settings.