code: function basicStatic(options) {
    return function serveStatic(req, res) {
      if (!options) options = {};
  
      const rootDir = options.rootDir ? options.rootDir : process.cwd();
      const basePath = path.join(rootDir, url.parse(req.url).pathname);
      const compress = options.compress && req.headers['accept-encoding'] ? true : false;
  
      if (compress) {
        checkCompress(basePath, function(err, filePath) {
          statFile(filePath, function(err, stats) {
            if (err) {
              res.writeHead(err.httpCode, {'Content-Type': 'application/json'});
              res.end(JSON.stringify(err));
  
            } else if (should304(req, stats)) {
              res.writeHead(304);
              res.end();
  
            } else {
              const cache = options.cache ? options.cache : 'max-age=86400';
              serveFile(req, res, stats, filePath, cache);
            }
          });
        });
  
      } else {
        statFile(basePath, function(err, stats) {
          if (err) {
            res.writeHead(err.httpCode, {'Content-Type': 'application/json'});
            res.end(JSON.stringify(err));
  
          } else if (should304(req, stats)) {
            res.writeHead(304);
            res.end();
  
          } else {
            const cache = options.cache ? options.cache : 'max-age=86400';
            serveFile(req, res, stats, basePath, cache);
          }
        });
      }
    }
  }
docs: @function basicStatic
  @public
  
  @param: options {Object} Possible options are as follows:
  options.rootDir {String} Root directory. Defaults to process.cwd()
  options.cache {String} Cache-Control headers. Defaults to 24hrs.
  options.compress {Boolean} Serve a gzipped version of the file. Defaults to false.
  
  @returns: a {Function} to handle the request