I have two .env files in my repo named .env.development and .env.example( to help devs with setting env variables and names). Now while using nodemon to start the server, I want nodemon to look into .env.development file. I tried two scripts:
"nodemon-dev": "NODE_ENV=development nodemon src/index.ts",
and
"nodemon-dev": "nodemon src/index.ts",
both are working as expected and looking into .env.development file for env variables but in the first case it makes sense as I have specified it, however the second script seems to be a bit confusing for me. How is it looking into .env.development by default?