Starting from Node.js v20.6.0 you can read dot env files into the process.env
object using the --env-file=path
nodejs option.
If you're using NestJS's CLI (@nestjs/cli
package) you can turn on that Node.js option in two ways:
nest start --exec "node --env-file=.env"
- For NestJS v11 or above:
nest start --env-file .env
Top comments (0)