#Support for NodeJS v20 Env Vars

2 messages · Page 1 of 1 (latest)

lime jungle
#

It is now well known that node.js v20 added the hability to load env var without any external lib

node --env-file=config.env index.js

I tried building a nestjs application and then running the command above and it worked! However, when I try to run via nestjs cli it does not work.

I would expect a similar flag in the cli:

nest start --env-file=config.env

nest start --watch --env-file=config.env

That would be really usefull. Do you have any idea whether this will be added to Nest?

modern lintel
#

nest start -e 'node --env-file=config.env' should do it