Consider dotenvx - also from the creator of dotenv.
so if the start command in package.json was previously:
"start": "node src/Server.bs.js",
it would now be:
"start": "dotenvx run -- node src/Server.bs.js",
No need for any extra dotenv.config initialization step in your app code.
Or alternatively if you don’t mind experimental node features there’s also:
node --env-file=.env app.js