feathersjs-ecosystem / configuration

[MOVED] A plugin for configuring a Feathers application
https://github.com/feathersjs/feathers
MIT License
28 stars 15 forks source link

Move config options to app.config instead of the Express app object. #31

Closed ekryski closed 7 years ago

ekryski commented 8 years ago

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:

  1. node-config already exposes the .get and .set functionality
  2. 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
  3. It might help us decouple from Express a bit more instead of relying on the .get and .set functionality.
  4. It gives a central place to access config values so you can dynamically set and get them. Basically a basic synchronous in memory service.
  5. app.config is a bit more explicit, especially for people that are new to Feathers/Express

To get this done

Related

https://github.com/feathersjs/feathers/issues/258

daffl commented 7 years ago

Our v3 version of Feathers decoupled from Express still supports the normal app.get and app.set so I don't think this super relevant anymore.