diff --git a/lib/loopback.js b/lib/loopback.js index 032f5d34..0f9f72f7 100644 --- a/lib/loopback.js +++ b/lib/loopback.js @@ -55,6 +55,8 @@ function createApplication() { merge(app, proto); + app.loopback = loopback; + // Create a new instance of models registry per each app instance app.models = function() { return proto.models.apply(this, arguments); diff --git a/test/app.test.js b/test/app.test.js index 8f9be923..e3fed516 100644 --- a/test/app.test.js +++ b/test/app.test.js @@ -524,4 +524,9 @@ describe('app', function() { expect(app2.get('key'), 'app2 value').to.equal(undefined); }); }); + + it('exposes loopback as a property', function() { + var app = loopback(); + expect(app.loopback).to.equal(loopback); + }); });