We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We should use dotenv-expand instead of dotenv.
dotenv-expand
dotenv
Instead of this:
import { config } from 'dotenv'; config();
We should do this:
import { config } from 'dotenv'; import dotenvExpand from 'dotenv-expand'; dotenvExpand(config());
We use dotenv to fetch configuration from the .env file
.env
We should switch to using dotenv-expand
Using dotenv-expand, we can do this:
DB_PROVIDER = "my-database-provider" DB_USER = "my-database-user" DB_PASSWORD = "my-database-password" DB_HOST = "my-database-host" DB_POST = 3306 DB_NAME = "my-database-name" DATABASE_URL = "${DB_PROVIDER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_POST}/${DB_NAME}"
Currently, we'd have to specify the full DATABASE_URL.
DATABASE_URL
The text was updated successfully, but these errors were encountered:
https://docs.nestjs.com/techniques/configuration#expandable-variables
Sorry, something went wrong.
Oops, thanks!
No branches or pull requests
I'm submitting feature request
We should use
dotenv-expand
instead ofdotenv
.Instead of this:
We should do this:
Current behavior
We use
dotenv
to fetch configuration from the.env
fileExpected behavior
We should switch to using
dotenv-expand
What is the motivation / use case for changing the behavior?
Using
dotenv-expand
, we can do this:Currently, we'd have to specify the full
DATABASE_URL
.The text was updated successfully, but these errors were encountered: