Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move default of "views" out so multiple cwd() calls are not made

  • Loading branch information...
commit 76d3ec583d9ea7dba164765a106d3b7a6f764180 1 parent bf60d5a
TJ Holowaychuk tj authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/application.js
7 lib/application.js
View
@@ -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(){
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.