In order to decouple us from Express we might want to namespace config options to app.config instead of using app.set() and app.get(). The rationale:
node-config already exposes the .get and .set functionality
with Express it’s kind of a weird legacy API inconsistency because you can do app.get for a route as well which is confusing
It might help us decouple from Express a bit more instead of relying on the .get and .set functionality.
It gives a central place to access config values so you can dynamically set and get them. Basically a basic synchronous in memory service.
app.config is a bit more explicit, especially for people that are new to Feathers/Express
To get this done
[ ] Assign the node-config instance to app.config
[ ] Alias Express' app.get and app.set to app.config.get and app.config.set except for when registering an Express get route. This might mean implementing with the Buzzard release when the engine adapters are more established.
In order to decouple us from Express we might want to namespace config options to
app.config
instead of usingapp.set()
andapp.get()
. The rationale:.get
and.set
functionalityapp.get
for a route as well which is confusing.get
and.set
functionality.app.config
is a bit more explicit, especially for people that are new to Feathers/ExpressTo get this done
app.config
app.get
andapp.set
toapp.config.get
andapp.config.set
except for when registering an Expressget
route. This might mean implementing with the Buzzard release when theengine
adapters are more established.Related
https://github.com/feathersjs/feathers/issues/258