Let me know if there would be a better approach or if this is a bad idea for some reason.
Basically detects if the request file is a js file, and if so requires it and merges it (with deepmerge).
Also pushes files onto configFiles array, as to not return from for loop, thereby allowing multiple files per directory.
expirment to support .js files and multiple config files per path
The configFiles behavior is intentional so that you can have environment branching without merging.
I see, so the pattern I was going for was to have a default config.json provided by the application and then a config.local.json file to override parts of it.
If I understand correctly you would recommend using 1 config.json and then override it in whole by config.DEVELOPMENT.json?