@@ -9,12 +9,10 @@
, debug = require('debug')('express:application')
, locals = require('./utils').locals
, View = require('./view')
- , url = require('url')
, utils = connect.utils
, path = require('path')
, http = require('http')
- , join = path.join
- , fs = require('fs');
+ , join = path.join;
/**
* Application prototype.
@@ -33,7 +31,6 @@
*/
app.init = function(){
- var self = this;
this.cache = {};
this.settings = {};
this.engines = {};
@@ -106,7 +103,7 @@
*/
app.use = function(route, fn){
- var app, home, handle;
+ var app, handle;
// default route to '/'
if ('string' != typeof route) fn = route, route = '/';
@@ -410,8 +407,9 @@
if ('get' == method && 1 == arguments.length) return this.set(path);
var args = [method].concat([].slice.call(arguments));
if (!this._usedRouter) this.use(this.router);
- return this._router.route.apply(this._router, args);
- }
+ this._router.route.apply(this._router, args);
+ return this;
+ };
});
/**
@@ -454,8 +452,7 @@
*/
app.render = function(name, options, fn){
- var self = this
- , opts = {}
+ var opts = {}
, cache = this.cache
, engines = this.engines
, view;