code: function requestListener(req, res) {
      // Add CORS header if option chosen
      if (argv.cors) {
          res.setHeader("Access-Control-Allow-Origin", "*");
          res.setHeader("Access-Control-Request-Method", "*");
          res.setHeader("Access-Control-Allow-Methods", "OPTIONS, GET");
          res.setHeader(
              "Access-Control-Allow-Headers",
              "authorization, content-type"
          );
          // When the request is for CORS OPTIONS (rather than a page) return just the headers
          if (req.method === "OPTIONS") {
              res.writeHead(200);
              res.end();
              return;
          }
      }
  
      const safeFullFileName = getFilePathFromUrl(req.url, basePath);
  
      fs.stat(safeFullFileName, function(err, stats) {
          var fileBuffer;
          if (!err && stats.isFile()) {
              fileBuffer = fs.readFileSync(safeFullFileName);
              let ct = mime.lookup(safeFullFileName);
              log(`Sending ${safeFullFileName} with Content-Type ${ct}`);
              res.writeHead(200, { "Content-Type": ct });
          } else {
              log("Route %s, replacing with index.html", safeFullFileName);
              fileBuffer = returnDistFile();
              res.writeHead(200, { "Content-Type": "text/html" });
          }
  
          res.write(fileBuffer);
          res.end();
      });
  }
docs: HELPERS