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
In most cases, you'll want to get your configuration object synchronously before your application starts up. But, if you prefer, you can also get your secrets asynchronously like this.
67
68
68
69
```js
69
-
import {config} from'@jwerre/secrets';
70
-
71
-
( asyncfunction(){
70
+
import { config } from'@jwerre/secrets';
72
71
72
+
(asyncfunction () {
73
73
constappConfig=awaitconfig(options);
74
-
75
74
})();
76
75
```
77
76
@@ -90,10 +89,10 @@ import {config} from '@jwerre/secrets';
90
89
91
90
Your secrets should be named appropriately so they can be parsed into a proper object. They should also have an environment like 'production' or 'development' so the secrets can be loaded into the correct environment. You may use a namespace but that\'s not required. The [example](#example) above was generated from secrets with the following names:
92
91
93
-
-`acme-co/production/name`
94
-
-`acme-co/production/db`
95
-
-`acme-co/production/session`
96
-
-`acme-co/production/apis/google`
92
+
-`acme-co/production/name`
93
+
-`acme-co/production/db`
94
+
-`acme-co/production/session`
95
+
-`acme-co/production/apis/google`
97
96
98
97
### Delimiters
99
98
@@ -108,10 +107,7 @@ You'll need to give your application or service permission to access your secret
| stage | String | Staging label attached to the version. |
169
-
| raw | Boolean | Return the full response from AWS. |
170
-
| maxBuffer=65536 | Number | Largest amount of data in Bytes the secret can be (default: 65536 Bytes) which is the quota. See [Secret Manager quotas](https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_limits.html#quotas). |
| stage | String | Staging label attached to the version. |
165
+
| raw | Boolean | Return the full response from AWS. |
166
+
| maxBuffer=65536 | Number | Largest amount of data in Bytes the secret can be (default: 65536 Bytes) which is the quota. See [Secret Manager quotas](https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_limits.html#quotas). |
0 commit comments