Skip to content
Myr

add deprecation message to app.configure

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent c468f5f · Browse files · 2 files+12 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+12 added−6 removed

  • other:+12 added−6 removed

2 files+12 added−6 removed

modified:lib/application.js+11 added-6 removed
46 unmodified lines
47app.defaultConfiguration = function(){48 // default settings49 this.enable('x-powered-by');50 this.set('etag', 'weak');51 this.set('env', process.env.NODE_ENV || 'development');51 var env = process.env.NODE_ENV || 'development';52 this.set('env', env);53 this.set('subdomain offset', 2);54 this.set('trust proxy', false);54 debug('booting in %s mode', this.get('env'));5556 debug('booting in %s mode', env);5758 // implicit middleware59 this.use(connect.query());60 this.use(middleware.init(this));61
25 unmodified lines
87 this.set('view', View);88 this.set('views', process.cwd() + '/views');89 this.set('jsonp callback name', 'callback');9089 this.configure('development', function(){91 if (env === 'development') {92 this.set('json spaces', 2);91 });93 }9493 this.configure('production', function(){95 if (env === 'production') {96 this.enable('view cache');95 });97 }98};99100/**101 * Proxy `connect#use()` to apply settings to
310 unmodified lines
412 if ('all' == envs || ~envs.indexOf(this.settings.env)) fn.call(this);413 return this;414};415416app.configure = deprecate.function(app.configure,417 'app.configure: Check app.get(\'env\') in an if statement');418419/**420 * Delegate `.VERB(...)` calls to `router.VERB(...)`.421 */422
131 unmodified lines
modified:History.md+1 added
1unreleased2==========34 * add deprecation message to `app.configure`5 * deps: send@0.5.06 - Accept string for `maxage` (converted by `ms`)7 - Include link in default redirect response8
1493 unmodified lines