Skip to content

Instantly share code, notes, and snippets.

View srivathsapv's full-sized avatar

Srivathsa Pasumarthi srivathsapv

View GitHub Profile
@srivathsapv
srivathsapv / extend-views.js
Created August 18, 2014 06:58
Specifying multiple views for Express 4.x
var enableMultipleViewFolders = function(express) {
var eView= express.get('view');
var lookupProxy = eView.prototype.lookup;
eView.prototype.lookup = function (view) {
if (this.root instanceof Array) {
var opts = {};
var matchedView = null,
roots = this.root;