code: function findView(req) {
    var viewpath = normalizeRequestPath(req.path, 'index');
    // This pattern finds all possible view files.
    var pattern = viewpath + '{/index.,.}+(jade|htm)';
    // #region How it works
    // See https://github.com/isaacs/node-glob#glob-primer
    // (For the following examples to work, the files must exist.)
    //
    // Given a sourceDir of '/x/y/z' and a viewpath of 'hello':
    // > glob.sync('hello{/index.,.}+(jade|htm)', {cwd: sourceDir, nodir: true});
    // ['hello.jade', 'hello/index.jade']
    // 
    // If the viewpath equals the word 'index':
    // > glob.sync('index{/index.,.}+(jade|htm)', {cwd: sourceDir, nodir: true});
    // ['index.htm', 'index.jade']
    // 
    // If the viewpath is a directory like 'hello/goodbye':
    // > glob.sync('hello/goodbye{/index.,.}+(jade|htm)', 
    //     { cwd: sourceDir, nodir: true});
    // ['hello/goodbye.jade', 'hello/goodbye/index.jade']
    // #endregion
    verbose('Finding views in: ', build.sourceDir, ' with pattern: ', pattern);
    var files = glob.sync(pattern, {
      cwd: build.sourceDir,
      nodir: true
    });
    if (files.length === 0)
      return false;
    req.viewpath = path.join(build.sourceDir, files[0]);
    console.log('GET ' + req.path + ' -> ' + req.viewpath);
    return true;
  }
docs: TODO: Make findView async. TODO: Generate findView pattern file extensions from configured engines.