I am using an .env file to hold environment variables for the server. This works if I run the server with foreman start. But it doesn\'t work with nodemon.
I would
Use the -w key to specify nodemon what to watch additionally.
"scripts": { "dev": "env-cmd nodemon -w app -w *.js -w .env server.js" }
Don't forget rerun npm run dev