You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* rate limit requsts by second ([#45](https://github.com/jazida-opensource/dotenv-azure/issues/45)) ([5cb9de3](https://github.com/jazida-opensource/dotenv-azure/commit/5cb9de3))
30
+
- rate limit requsts by second ([#45](https://github.com/jazida-opensource/dotenv-azure/issues/45)) ([5cb9de3](https://github.com/jazida-opensource/dotenv-azure/commit/5cb9de3))
- Create an issue to discuss about the changes you want to do before starting to code.
14
14
- Send a [GitHub Pull Request](https://github.com/jazida-opensource/dotenv-azure/compare?expand=1) with a clear list of what you've done (read more [about pull requests](https://help.github.com/articles/about-pull-requests/)). Make sure all of your commits are atomic (one feature per commit).
Copy file name to clipboardExpand all lines: README.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -24,16 +24,17 @@ If you would like to know more about App Configuration and Key Vault, you may wa
24
24
#### Install the package
25
25
26
26
Install with npm
27
+
27
28
```bash
28
29
npm install dotenv-azure
29
30
```
30
31
31
32
or with yarn
33
+
32
34
```bash
33
35
yarn add dotenv-azure
34
36
```
35
37
36
-
37
38
#### Configuring App Configuration
38
39
39
40
1.[Create an app configuration store via Azure portal or CLI](https://docs.microsoft.com/en-us/azure/azure-app-configuration/quickstart-aspnet-core-app#create-an-app-configuration-store).
@@ -70,7 +71,7 @@ Now when you call the `.config()` method, the value of your key vault secret wil
70
71
```javascript
71
72
const { DotenvAzure } =require('dotenv-azure')
72
73
73
-
asyncfunctionmain() {
74
+
asyncfunctionmain() {
74
75
awaitnewDotenvAzure().config()
75
76
console.log(process.env.DATABASE_URL) // prints your secret value
76
77
}
@@ -81,10 +82,11 @@ main()
81
82
#### Using dotenv-azure programmatically
82
83
83
84
You should call `dotenv-azure` before the initialization of your app. Since the method `.config()` returns a promise, you have to call it inside an async function:
85
+
84
86
```javascript
85
87
const { DotenvAzure } =require('dotenv-azure')
86
88
87
-
asyncfunctionmain() {
89
+
asyncfunctionmain() {
88
90
constdotenvAzure=newDotenvAzure()
89
91
const { parsed } =awaitdotenvAzure.config()
90
92
@@ -138,11 +140,11 @@ You can pass a `safe` option to validate your variables from a `.env.example` fi
138
140
const { DotenvAzure } =require('dotenv-azure')
139
141
constdotenvAzure=newDotenvAzure()
140
142
141
-
asyncfunctionmain() {
143
+
asyncfunctionmain() {
142
144
awaitdotenvAzure.config({
143
145
safe:true,
144
146
allowEmptyValues:true,
145
-
example:'./.my-env-example-filename'
147
+
example:'./.my-env-example-filename',
146
148
})
147
149
}
148
150
@@ -175,5 +177,3 @@ This project follows the [all-contributors](https://github.com/kentcdodds/all-co
0 commit comments