See packages/dotenv
Node.js 20 adds support for .env. files
node --env-file=.env app.js
then in code
process.env.PORT; // "3000"
Last updated 13 days ago