{"size": 369, "ext": "js", "max_stars_repo_path": "routes/index.js", "max_stars_repo_name": "chidelmun/Wakku", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "routes/index.js", "max_issues_repo_name": "chidelmun/Wakku", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "routes/index.js", "max_forks_repo_name": "chidelmun/Wakku", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.3846153846, "max_line_length": 72, "alphanum_fraction": 0.6260162602}
var User = require('../models/user');
var Post = require('../models/post');

exports.index = function(req, res, next){
	Post.find({}, null, {sort: {created_at: -1}}, function (error, posts) {
    if (error) return next(error);
    res.render('index', {user: req.session.user, posts: posts})
  });
};

exports.user = require('./user');

exports.post = require('./post');