How do I setup the dotenv file in Node.js?

前端 未结 30 1159

I am trying to use the dotenv NPM package and it is not working for me. I have a file config/config.js with the following content:



        
30条回答
  •  旧巷少年郎
    2020-12-07 14:56

    I solved this just renaming the file to .env to y file was named config.env , when I renamed to .env , it works.

提交回复
热议问题