Closed RomainLanz closed 8 months ago
I see the current implementation will fail with certain values. For example:
Given, I add the following file
identifier.
EnvParser.identifier('file', (_value: string) => {
return '3000'
})
Following is the actual and the expected output.
ENV_USER=file_romain:password
// Expected value
file_romain:password
// Actual value
3000
Also, there should be a way to escape identifiers in the case where they conflict with some other value. For example:
ENV_USER=file\:///root/app/user.js
// Expected value
file:///root/app/user.js
// Actual value
3000
Hey there! 👋🏻
This PR adds a way to set up an identifier for an environment variable, helping to interpolate the value of your env.
It can be useful in multiple scenarios.
To manage your secrets, you may use a Secrets Vault like
Docker Secret
orHashiCorp Vault
. Doing so it will generate a path for your secret and won't give you any value directly. You can write a custom logic to read the file content.You may encrypt your secrets. You will be able to decrypt them on the fly.