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
Hello, this is a commonly asked question. The reason why don't support .js extension for "master" configuration files (config, datasources, model-config, etc.) is to allow programatic editing of the configuration via loopback-workspace, for example in StrongLoop Arc. Now we have config.json that is easy to edit via JSON.parse and JSON.stringify. If there was config.js, our tooling would not be able to display and modify this configuration.
Activity
edachsanpro commentedon Mar 10, 2016
look the doc:
https://docs.strongloop.com/display/public/LB/Environment-specific+configuration
giowe commentedon Mar 12, 2016
yes... as I said:
I can use both server/config.{env}.json/js
but just server/config.json.
It would be useful a server/config.js
davidcheung commentedon Apr 14, 2016
Hi @giowe, thanks for bringing this up,
with the use of
config.local.jsshould let you manage only 1 file.I'm also curious as to why
config.jsisn't under the default boot list, whileconfig.local.jsandconfig.<env>.jsworks@bajtos, @superkhau any thoughts?
bajtos commentedon Apr 18, 2016
Hello, this is a commonly asked question. The reason why don't support
.jsextension for "master" configuration files (config, datasources, model-config, etc.) is to allow programatic editing of the configuration via loopback-workspace, for example in StrongLoop Arc. Now we haveconfig.jsonthat is easy to edit viaJSON.parseandJSON.stringify. If there wasconfig.js, our tooling would not be able to display and modify this configuration.@crandmck @davidcheung could we please write this down somewhere in our docs or FAQ?
bajtos commentedon Apr 18, 2016
Loosely related: strongloop/loopback-boot#93
crandmck commentedon Apr 18, 2016
Added an FAQ item which is duplicated in LoopBack doc space.