Commit Graph

2 Commits

Author SHA1 Message Date
Miroslav Bajtoš 0058efb2ee Remove unnecessary allocations from rest handler
Correctly cache the list of `preHandlers` so that they are built only
once in application lifetime.

Remove array concatenation, use a new callback function instead.
2015-01-13 08:48:22 +01:00
Miroslav Bajtoš 7fc66a182e Move middleware sources to `server/middleware`
The new location allows developer to use the following identifiers
when loading the middleware using the new declarative style:

    app.middlewareFromConfig(
      require('loopback/server/middleware/rest'),
      { phase: 'routes' });

    app.middlewareFromConfig(
      require('loopback/server/middleware/url-not-found'),
      { phase: 'final' });
2014-11-12 12:44:34 +01:00