Harold L. Brown
Harold L. Brown

Reputation: 9966

Is NestJS using NODE_ENV? Is it recommended to set it?

I am using NestJS and I am new to it.

I have read that NODE_ENV is an environment variable that specifies the environment, introduced by Express.

Since NestJS is based on Express, I don't know if NODE_ENV is also relevant for NestJS.

Is it still recommended to set NODE_ENV when using NestJS? Or is it not necessary for NestJS?

Upvotes: 1

Views: 2064

Answers (2)

Bruno Lipovac
Bruno Lipovac

Reputation: 447

In case you are going to use environment variables, make sure to read this:

https://docs.nestjs.com/techniques/configuration

It will save you a lot of trouble!

Upvotes: 0

Ayoub Touba
Ayoub Touba

Reputation: 2997

Setting environment variables is up to your needs, and for NODE_ENV if your application doesn't' support any kind of several environment like prod, dev.. than you're not necessary to add it.

Upvotes: 2

Related Questions