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
Copy file name to clipboardExpand all lines: README.md
+78-85Lines changed: 78 additions & 85 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -243,19 +243,13 @@ After that priority is grouped by type and path.
243
243
244
244
*json* files have higher priority than *ini* files.
245
245
246
-
Files in a subdirectory with the same name as the base part of the entry file will have higher priority.
246
+
First the module looks for a subdirectory called *config* at the same path where your *package.json* is located.
247
247
248
-
Files in a subdirectory with the name config will come next.
248
+
If that is not found then it searches the parent directory for at directory called *config*.
249
249
250
-
Files in a sibling directory with the name config will come next.
250
+
If that is not found then it searches for a subdirectory in the same location as the *package.json*with the same basename as the executed file.
251
251
252
-
After that configs in the same directory will be processed.
253
-
254
-
There is a fallback to a config file with the base name *default*. The priority here will be
255
-
1. subdirectory with the same basename as the entry file
256
-
2. subdirectory called config
257
-
3. config file located in a sibling directory called config
258
-
4. config file located in the same directory
252
+
If that is not found then it searches in the same directory as your *package.json*
259
253
260
254
261
255
### CONFIG_FILE and CONFIG_PATH
@@ -267,113 +261,112 @@ If the *CONFIG_FILE* is a relative path then the default path will be used. If t
267
261
268
262
269
263
#### Examples ####
270
-
So if we wish to load a development configuration from an entry file called server.js then the following order is processed
264
+
So if we wish to load a development configuration from an entry file called server.js in a directory called serverapp then the following order is processed
0 commit comments