{"size": 951, "ext": "js", "max_stars_repo_path": "server.js", "max_stars_repo_name": "joeframbach/cache-test", "max_stars_repo_stars_event_min_datetime": "2019-01-18T01:52:42.000Z", "max_stars_repo_stars_event_max_datetime": "2019-01-18T01:52:42.000Z", "max_issues_repo_path": "server.js", "max_issues_repo_name": "joeframbach/cache-test", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "server.js", "max_forks_repo_name": "joeframbach/cache-test", "max_forks_repo_forks_event_min_datetime": "2019-01-18T01:53:48.000Z", "max_forks_repo_forks_event_max_datetime": "2019-11-16T04:31:35.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 36.5769230769, "max_line_length": 74, "alphanum_fraction": 0.6750788644}
var connect = require('connect');
var http = require('http');
var url = require('url');
var serveStatic = require('serve-static');
var app = connect();

app.use(serveStatic('public'));
app.use('/test', serveStatic('test'));
app.use('/vendor/mocha.css', serveStatic('node_modules/mocha/mocha.css'));
app.use('/vendor/mocha.js', serveStatic('node_modules/mocha/mocha.js'));
app.use('/vendor/chai.js', serveStatic('node_modules/chai/chai.js'));
app.use('/assets', function (req, res, next) {
  req.query = url.parse(req.url, true).query;
  res.setHeader("Cache-Control", "max-age=86400, public");
  res.setHeader("Expires", new Date(Date.now() + 86400000).toUTCString());
  if ('corb' in req.query) {
    res.setHeader('X-Content-Type-Options', 'nosniff');
  }
  setTimeout(function () {
    next();
  }, Math.min(10000, Math.max(0, +req.query.delay)));
});
app.use('/assets', serveStatic('assets', {etag: false}));

http.createServer(app).listen(3000);
