Commit d123bb6 1 parent 4e3e3b5 commit d123bb6 Copy full SHA for d123bb6
File tree 1 file changed +40
-0
lines changed
1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,27 @@ Override any environment variables that have already been set on your machine wi
161
161
require (' dotenv' ).config ({ override: true })
162
162
```
163
163
164
+ ##### Multiline
165
+
166
+ Default: ` false `
167
+
168
+ Turn on multiline line break parsing.
169
+
170
+ ``` js
171
+ require (' dotenv' ).config ({ multiline: true })
172
+ ```
173
+
174
+ This allows specifying multiline values in this format:
175
+
176
+ ```
177
+ PRIVATE_KEY="-----BEGIN PRIVATE KEY-----
178
+ MIGT...
179
+ 7ure...
180
+ -----END PRIVATE KEY-----"
181
+ ```
182
+
183
+ Ensure that the value begins with a single or double quote character, and it ends with the same character.
184
+
164
185
### Parse
165
186
166
187
The engine which parses the contents of your file containing environment
@@ -190,6 +211,25 @@ const config = dotenv.parse(buf, opt)
190
211
// expect a debug message because the buffer is not in KEY=VAL form
191
212
```
192
213
214
+ ##### Multiline
215
+
216
+ Default: ` false `
217
+
218
+ Turn on multiline line break parsing.
219
+
220
+ ``` js
221
+ require (' dotenv' ).config ({ multiline: true })
222
+ ```
223
+
224
+ This allows specifying multiline values in this format:
225
+
226
+ ```
227
+ PRIVATE_KEY="-----BEGIN PRIVATE KEY-----
228
+ MIGT...
229
+ 7ure...
230
+ -----END PRIVATE KEY-----"
231
+ ```
232
+
193
233
## Other Usage
194
234
195
235
### Preload
You can’t perform that action at this time.
0 commit comments