Closed radziszp closed 5 years ago
I think I saw your question on stackoverflow ;)
That should be the correct behaviour. I'll add a test for this scenario and fix this issue.
Which version of nestjs-config are you using?
Wasn't me, but glad i'm not the only one who couldn't fix it by himself :)
I'm using v 1.2.9
Thanks! I'm looking forward for updates
so, update on this. There was a PR made recently where I was asked to change export ConfigOptions = {...} & EnvOptions
to export interface ConfigOptions extends EnvOptions {...}
. Changing it back to the latter seems to work, however I don't understand why the former doesn't work? https://github.com/nestjs-community/nestjs-config/pull/48/commits/aab42650a71d5ff9b9cb0e4b7cec57b27119f1ed#diff-11f5a2a5cc6df739d69a8a8c4f8ecffbR23
This should now be resolved in the next release :)
:+1: Thanks!
What shall I pass the path
value?
// src/bootstrap.module.ts
ConfigModule.resolveSrcPath(__dirname).load('config/**/!(*.d).{ts,js}', { path: '.env.test' }),
# .env.test
DEMO=test
It doesn't load the file .env.test
instead it loading .env
. Seems the path
options has been ignored.
@Diluka I think you need to add the full path. Try that and let me know how it goes. I shall have a think about whether to add a method to add the cwd path by default
emmmm it works now. just filename. ┓( ´∀` )┏
Hello, as written in docs:
I'd like to set different .env file for Test module. When i'm doing
I'm getting
So, how should
options
parameter looks like?Also is there a possibility, to extend in
.env.test
file values from default.env
file, so wouldn't i have to duplicate code?Thanks