{"size": 1344, "ext": "js", "max_stars_repo_path": "settings.js", "max_stars_repo_name": "Mozilla-GitHub-Standards/006f8045fb41112aeece253a19b2c968965e022c558bc377238f08f8c26fd997", "max_stars_repo_stars_event_min_datetime": "2015-12-29T15:57:45.000Z", "max_stars_repo_stars_event_max_datetime": "2016-10-21T11:12:33.000Z", "max_issues_repo_path": "settings.js", "max_issues_repo_name": "Mozilla-GitHub-Standards/006f8045fb41112aeece253a19b2c968965e022c558bc377238f08f8c26fd997", "max_issues_repo_issues_event_min_datetime": "2019-03-28T04:20:38.000Z", "max_issues_repo_issues_event_max_datetime": "2019-03-28T04:20:38.000Z", "max_forks_repo_path": "settings.js", "max_forks_repo_name": "Mozilla-GitHub-Standards/006f8045fb41112aeece253a19b2c968965e022c558bc377238f08f8c26fd997", "max_forks_repo_forks_event_min_datetime": "2019-03-28T04:20:39.000Z", "max_forks_repo_forks_event_max_datetime": "2019-03-28T04:20:39.000Z"}
{"max_stars_count": 2, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 26.88, "max_line_length": 77, "alphanum_fraction": 0.6071428571}
// Module dependencies.
module.exports = function(app, configurations, express) {
  var clientSessions = require('client-sessions');
  var nconf = require('nconf');

  nconf.argv().env().file({ file: 'local.json' });

  // Configuration

  app.configure(function(){
    app.set('views', __dirname + '/views');
    app.set('view engine', 'jade');
    app.set('view options', { layout: false });
    app.use(express.json());
    app.use(express.urlencoded());
    app.use(express.methodOverride());
    if (!process.env.NODE_ENV) {
      app.use(express.logger('dev'));
    }
    app.use(express.static(__dirname + '/public'));
    app.use(clientSessions({
      cookieName: nconf.get('session_cookie'),
      secret: nconf.get('session_secret'),
      duration: 24 * 60 * 60 * 1000 * 28 // 4 weeks
    }));
    app.use(function(req, res, next) {
      res.locals.session = req.session;

      if (process.env.NODE_ENV) {
        res.locals.manifest = '/manifest.appcache';
      } else {
        res.locals.manifest = '';
      }
      next();
    });
    app.locals.pretty = true;
    app.use(app.router);
  });

  app.configure('development, test', function(){
    app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
  });

  app.configure('prod', function(){
    app.use(express.errorHandler());
  });

  return app;
};
