#How to use .env.local in ConfigModule env path or multiple different .env files
1 messages · Page 1 of 1 (latest)
ConfigModule.forRoot({
envFilePath: ['.env.development.local', '.env.development'],
});```
Hey thanks, does the file path need to be absolute or relative or just the filename? How does it know where to look for the file? Does order of file import matter here?
https://docs.nestjs.com/techniques/configuration#custom-env-file-path
By default, the package looks for a .env file in the root directory of the application
So I think it's root-relative
Documentation | NestJS - A progressive Node.js framework
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
shortly ConfigModule uses dotenv.