loopback/lib
Miroslav Bajtoš 4e1433b519 Middleware phases - initial implementation
Modify the app and router implementation, so that the middleware is
executed in order defined by phases.

Predefined phases:

    'initial', 'session', 'auth', 'parse', 'routes', 'files', 'final'

Methods defined via `app.use`, `app.route` and friends are executed
as the first thing in 'routes' phase.

API usage:

    app.middleware('initial', compression());
    app.middleware('initial:before', serveFavicon());
    app.middleware('files:after', loopback.urlNotFound());
    app.middleware('final:after', errorHandler());

Middleware flavours:

    // regular handler
    function handler(req, res, next) {
      // do stuff
      next();
    }

    // error handler
    function errorHandler(err, req, res, next) {
      // handle error and/or call next
      next(err);
    }
2014-11-10 19:50:58 +01:00
..
connectors Enable jscs for `lib`, fix style violations 2014-11-04 08:25:33 +01:00
middleware Add API doc for context middleware - see #337 2014-11-06 14:07:34 -08:00
access-context.js Enable jscs for `lib`, fix style violations 2014-11-04 08:25:33 +01:00
application.js Coding style cleanup (Gruntfile, lib) 2014-11-04 08:25:35 +01:00
browser-express.js Emit a 'modelRemoted' event by app.model() 2014-07-24 17:00:27 -07:00
builtin-models.js models: move Change LDL def into a json file 2014-10-14 09:04:43 +02:00
express-middleware.js Enable jscs for `lib`, fix style violations 2014-11-04 08:25:33 +01:00
loopback.js Middleware phases - initial implementation 2014-11-10 19:50:58 +01:00
model.js Coding style cleanup (Gruntfile, lib) 2014-11-04 08:25:35 +01:00
persisted-model.js Update persisted-model.js 2014-11-06 10:56:37 -08:00
registry.js Allows ACLs/settings in model config 2014-11-07 11:14:40 -08:00
runtime.js Enable jscs for `lib`, fix style violations 2014-11-04 08:25:33 +01:00
server-app.js Middleware phases - initial implementation 2014-11-10 19:50:58 +01:00