Is there possible to use multiple .env file in node JS ?

Forums Node.jsIs there possible to use multiple .env file in node JS ?
Staff asked 2 years ago

Answers (1)

Add Answer
Utsav Vasoya Marked As Accepted
Staff answered 2 years ago

Yes it’s possible, You have to create two .env files one for dev and one for prod and then you have to create one config file to read and set the environment from .env files.
You can refer to this article.

Subscribe

Select Categories