docs: function writeResolved(info, res, statusCode){
      statusCode = statusCode || 200;
      if (info.type === 'json'){
  
        res.setHeader('Content-Type', 'application/json');
        res.writeHead(statusCode);
        res.end(JSON.stringify(info.data));
  
        return true;
      } else if (info.type === 'file') {
        // content || assets
        sendFile(res, info.filename);
  
        return true;
      } else if (info.type === 'files') {
        // content with mutiple files
        if (info.files.length === 1){
          //res.setHeader('Content-Type', mime.lookup( info.files[0].filename) );
          sendFile(res, info.files[0].filename);
          return true;
        } else {
          var bpath = extractBasepath(info.files.map(function(f){ return f.filename; }));
  
          var relfiles = info.files.map(function(f){
            var fname = f.filename.replace(/\\/ig, '/');
            return fname.replace(bpath, '');
          });
  
          var htmls = relfiles.filter(function(rf){
            return (/\.html$/i).test(rf);
          });
  
          // the index HTML
          var ihtml = htmls.filter(function(h){ 
            return /index.htm(l)?/ig.test(h);
          });
  
          var idxhtml = ihtml.length > 0 ? ihtml[0] : undefined;
  
          if ( idxhtml === undefined){
            // index.html doesn't exists 
            // any html
            idxhtml = (htmls.length > 0 ? htmls[0] : undefined);
          }
  
          var route = '/content/' + info.uid;
          if (app.cacheContent[route] === undefined){
            app.cacheContent[route] = {
              path: bpath,
              index: idxhtml
            };
          }
          var r = route;
          var item = app.cacheContent[route];
          if (item.index !== undefined){
            r += '/' + item.index;
          }
          
          res.redirect(r);
          //res.sendFile(idxhtml, {root: bpath });
        }
  
        return true;
      }
  
      function sendFile(res, filename){
        var fname = path.basename(filename);
        fname = encodeURIComponent(fname);
        res.setHeader('Content-disposition', 'inline; filename="' + fname + '"');
        res.setHeader('Content-Type', mime.lookup(filename));
  
        res.sendFile(filename);
      }
  
      return false;
  
      function extractBasepath(entries) {
  
        var dirs = entries.map(function(e){ 
          return path.dirname(e); 
        });
  
        var sdirs = dirs.map(function(d){ 
          return d.split('\\');
        });
  
        var idx = 0;
        var curr;
        var root = '';
        var eq;
  
        var haveFunc = function(sd){ 
          return sd.length > idx; 
        };
  
        var eqFunc = function(i){
          return curr === i;
        };
  
        var eqmapFunc = function(a){ 
          return a[idx]; 
        };
  
        do {
  
          curr = sdirs[0][idx];
  
          var have = _.all(sdirs, haveFunc);
  
          eq = have;
          if (have === true){
            eq = _.all(sdirs.map(eqmapFunc), eqFunc);
          }
  
          if(eq) {
            root += curr + '/';
          }
  
          idx++;
  
        } while(eq === true);
  
        return root;
      }
    }