Skip to content

Commit

Permalink
move default of "views" out so multiple cwd() calls are not made
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Oct 6, 2012
1 parent bf60d5a commit 76d3ec5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/application.js
Expand Up @@ -83,6 +83,7 @@ app.defaultConfiguration = function(){
this.locals.settings = this.settings;

// default configuration
this.set('views', process.cwd() + '/views');
this.set('jsonp callback name', 'callback');

this.configure('development', function(){
Expand Down Expand Up @@ -484,9 +485,9 @@ app.render = function(name, options, fn){
// view
if (!view) {
view = new View(name, {
defaultEngine: this.get('view engine')
, root: this.get('views') || process.cwd() + '/views'
, engines: engines
defaultEngine: this.get('view engine'),
root: this.get('views'),
engines: engines
});

if (!view.path) {
Expand Down

0 comments on commit 76d3ec5

Please sign in to comment.