-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed as not planned
Labels
cliIssues and PRs related to the Node.js command line interface.Issues and PRs related to the Node.js command line interface.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Description
What is the problem this feature will solve?
Make environment variables configuration file loading more fluent.
What is the feature you are proposing to solve the problem?
Instead of loading it using a CLI command like node --env-file .env, it would be event better to use a package.json field containing the environment filename, this way, Node can automatically load the environment variables every time a NPM script is running.
Another idea would be to let Node detect if a default .env file exists, and load it for each NPM script that is running. According to this idea, may be we could have a flag like --no-env-file or --env-file none to tell Node to not load environment file by default.
This could be the default behavior.
What alternatives have you considered?
No response
Metadata
Metadata
Assignees
Labels
cliIssues and PRs related to the Node.js command line interface.Issues and PRs related to the Node.js command line interface.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.