File tree 1 file changed +29
-1
lines changed
1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,35 @@ You need to deploy your secrets in a cloud-agnostic manner? Use a `.env.vault` f
190
190
191
191
## 🌴 Manage Multiple Environments
192
192
193
- Use [ dotenv-vault] ( https://github.com/dotenv-org/dotenv-vault ) .
193
+ Use [ dotenvx] ( https://github.com/dotenvx/dotenvx ) or [ dotenv-vault] ( https://github.com/dotenv-org/dotenv-vault ) .
194
+
195
+ ### dotenvx
196
+
197
+ Run any environment locally. Create a ` .env.ENVIRONMENT ` file and use ` --env-file ` to load it. It's straightforward, yet flexible.
198
+
199
+ ``` bash
200
+ $ echo " HELLO=production" > .env.production
201
+ $ echo " console.log('Hello ' + process.env.HELLO)" > index.js
202
+
203
+ $ dotenvx run --env-file=.env.production -- node index.js
204
+ Hello production
205
+ > ^^
206
+ ```
207
+
208
+ or with multiple .env files
209
+
210
+ ``` bash
211
+ $ echo " HELLO=local" > .env.local
212
+ $ echo " HELLO=World" > .env
213
+ $ echo " console.log('Hello ' + process.env.HELLO)" > index.js
214
+
215
+ $ dotenvx run --env-file=.env.local --env-file=.env -- node index.js
216
+ Hello local
217
+ ```
218
+
219
+ [ more environment examples] ( https://dotenvx.com/docs/quickstart/environments )
220
+
221
+ ### dotenv-vault
194
222
195
223
Edit your production environment variables.
196
224
You can’t perform that action at this time.
0 commit comments