- Step 1.
yarn add env-cmd - Step 2. Create a
.env-cmdrcin root level:{ "default": { "PORT": 8080 }, "production": { "GOOGLE_CLIENT_ID": "XXX.com", "GOOGLE_CLIENT_SECRET": "YYY", "GOOGLE_API_REDIRECT": "http://localhost:8080/login-google", "ALLOWED_EMAILS": ["machingclee@gmail.com", "james.lee@wonderbricks.com"], "JWT_SECRET": "SECRET!", "FRONTEND_URL": "http://localhost:3000" } } - Step 3. We prefix any command by
For example:env-cmd -f .env-cmdrc -e default,productionenv-cmd -f .env-cmdrc -e default,production nodemon --exec ts-node src/app.ts
0%
Environment Variable by env-cmdrc
Remark. Unless specified otherwise our
serverlessframework will be kept at3.38.0.
September 11, 2023








