code: function render (file, options, callback) {
      debug('render', file, options)
      // load layouts
      var layouts = loadLayouts(options)
      // load partials
      var partials = loadPartials(options)
      // get template function
      var template = loadTemplate(file, options)
      // wait for all promises to resolve
      return Promise.all([
          layouts,
          partials,
          template,
      ])
      // once all promises resolved render template
      .then(all => {
          var layouts = all[0]
          var partials = all[1]
          var template = all[2]
          // render options
          var hbsOptions = {
              helpers: GLOBAL.helpers,
              partials: partials,
          }
          // render template
          var body = template(options, hbsOptions)
          // get layout from options or default layout
          var layout = options.layout || GLOBAL.defaultLayout
          // use layout if found
          if (layout && layouts[layout]) {
              // pass layout contents of template render along with other params
              options.body = body
              // render layout
              body = layouts[layout](options, hbsOptions)
          }
          // if callback is passed then call with result
          if (callback) {
              callback(null, body)
          }
          // otherwise resolve with result
          else {
              return body
          }
      })
  }
docs: @function render
  
  Express view engine render function
  
  @param {string} file
  @param {object} options
  @param {function} callback
  
  @returns {Promise}
  
  @throws {Error}