Run:
node --env-file .env1 --env-file-if-exists .env2 --watch ./main.js
Change something in the .env1
file, notice the process restarts and the updated environment is logged.
Change something in the .env2
file, notice the process does not restart.