Repository navigation
Conversation
Load middleware directly via `require({name})` instead of relying
on shorthands provided by loopback.
|
Before we get down to implementation details in this change, I'd like to initiate a high-level discussion first.
The initial reason for keeping If that's the only reason why we have On the other hand, we may want to make loopback more opinionated and provide users with a pre-selected list of middleware that works well together. In which case it makes sense to keep /to @ritch @raymondfeng @altsang @superkhau thoughts? |
|
I would like to have a middleware extension point for LoopBack so that middleware can be registered with LB. The configured middleware will be accessible via loopback.logger or loopback.middleware.logger as the configured logger for LB. IMO, loopback. gives us more control as we can switch underlying modules across releases. |
|
@raymondfeng IIUC, you are saying this PR should be rejected because we still want to keep middleware registered on the As for the concept of having "a configured middleware accessible via loopback.logger" - isn't that obsoleted by the new component architecture? |
|
We need to start moving to a less opinionated more node / express compatible |
|
@ritch IIUC, you are saying this PR is going in the right direction and it should be landed. Is that correct? Should we move |
Yes. We should remove functionality from loopback that exists in other modules. I think we have two approaches to this:
|
Yes. Ideally we would find a module that does this... otherwise a separate module makes sense. |
Let's leave that out of scope of this PR. |
|
@raymondfeng @ritch IMHO the discussion is over, the agreement is to remove Do the changes LGTY? |
|
@slnode test please |
|
Yep LGTM |
|
I would prefer to hold off the merge until we finalize the middleware/policy management with phases. I'll add more comments when i have access to computers. |
|
@raymondfeng fair enough. I am reassigning the PR to you, please reassign back when it's time to continue the work. |
|
Closing in favour of #167 |
Load middleware directly via
require({name})instead of relying on shorthands provided by loopback.Requires strongloop/loopback#729
/to @raymondfeng @ritch please review