diff --git a/History.md b/History.md index 2a3abafe4..65e7c0690 100644 --- a/History.md +++ b/History.md @@ -4,6 +4,7 @@ * move middleware to separate repos * remove docs * remove node patches + * remove connect(middleware...) 2.x =================== diff --git a/lib/connect.js b/lib/connect.js index b55da4f16..e8727e94b 100644 --- a/lib/connect.js +++ b/lib/connect.js @@ -55,9 +55,6 @@ function createServer() { utils.merge(app, EventEmitter.prototype); app.route = '/'; app.stack = []; - for (var i = 0; i < arguments.length; ++i) { - app.use(arguments[i]); - } return app; }; diff --git a/test/directory.js b/test/directory.js index b6864527d..99339d2b8 100644 --- a/test/directory.js +++ b/test/directory.js @@ -119,7 +119,8 @@ describe('directory()', function(){ }); describe('when setting a custom template', function () { - var app = connect(connect.directory('test/fixtures', {'template': __dirname + '/shared/template.html'})); + var app = connect(); + app.use(connect.directory('test/fixtures', {'template': __dirname + '/shared/template.html'})); it('should respond with file list and testing template sentence', function (done) { app.request() @@ -138,7 +139,8 @@ describe('directory()', function(){ }); describe('when set with trailing slash', function () { - var app = connect(connect.directory('test/fixtures/')); + var app = connect(); + app.use(connect.directory('test/fixtures/')); it('should respond with file list', function (done) { app.request() @@ -157,7 +159,8 @@ describe('directory()', function(){ }); describe('when set to \'.\'', function () { - var app = connect(connect.directory('.')); + var app = connect(); + app.use(connect.directory('.')); it('should respond with file list', function (done) { app.request()