examples/view-constructor/github-view.js
function GithubView(name, options){
  this.name = name;
  options = options || {};
  this.engine = options.engines[extname(name)];
  // "root" is the app.set('views') setting, however
  // in your own implementation you could ignore this
  this.path = '/' + options.root + '/master/' + name;
}
function GithubView(name, options){
  this.name = name;
  options = options || {};
  this.engine = options.engines[extname(name)];
  // "root" is the app.set('views') setting, however
  // in your own implementation you could ignore this
  this.path = '/' + options.root + '/master/' + name;
}
function GithubView ( name , options ) { this . name = name ; options = options || { } ; this . engine = options . engines [ extname ( name ) ] ; // "root" is the app.set('views') setting, however // in your own implementation you could ignore this this . path = '/' + options . root + '/master/' + name ; }
Custom view that fetches and renders
remove github templates. You could
render templates from a database etc.
Custom view that fetches and renders remove github templates . You could render templates from a database etc .