{"size": 1115, "ext": "js", "max_stars_repo_path": "examples/blog/app.js", "max_stars_repo_name": "ghuntley/express", "max_stars_repo_stars_event_min_datetime": "2019-04-17T13:56:04.000Z", "max_stars_repo_stars_event_max_datetime": "2019-04-17T13:56:04.000Z", "max_issues_repo_path": "examples/blog/index.js", "max_issues_repo_name": "alexyoung/express", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "examples/blog/index.js", "max_forks_repo_name": "alexyoung/express", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.3, "max_line_length": 75, "alphanum_fraction": 0.666367713}

/**
 * Module dependencies.
 */

var express = require('../../')
  , app = module.exports = express();

// config

app.set('views', __dirname + '/views');
app.set('view engine', 'jade');

// middleware

app.configure('development',function(){
  app.use(express.logger('dev'));
})

app.configure(function(){
  app.use(express.bodyParser());
  app.use(express.methodOverride());
  app.use(express.cookieParser('keyboard cat'));
  app.use(express.session());
  app.use(app.router);
  app.use(express.static(__dirname + '/public'));
  app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
});

// Locals

app.locals.use(function(req, res){
  // expose "error" and "message" to all
  // views that are rendered.
  res.locals.error = req.session.error || '';
  res.locals.message = req.session.message || '';
  // remove them so they're not displayed on subsequent renders
  delete req.session.error;
  delete req.session.message;
});

// Routes

require('./routes/site')(app);
require('./routes/post')(app);

if (!module.parent) {
  app.listen(3000);
  console.log('Express started on port 3000');
}