{"size": 854, "ext": "js", "max_stars_repo_path": "templates/express/app/BearController.js", "max_stars_repo_name": "justinchou/bearcatjs-cli", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "templates/express/app/BearController.js", "max_issues_repo_name": "justinchou/bearcatjs-cli", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "templates/express/app/BearController.js", "max_forks_repo_name": "justinchou/bearcatjs-cli", "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": 27.5483870968, "max_line_length": 76, "alphanum_fraction": 0.6557377049}
'use strict';

let BearController = function BearController() {
    this.$id = 'bearController';
};

BearController.prototype.index = function (req, res, next) {
    console.log('Router BearController');
    console.log(req.query);
    console.log(req.body);
    res.render('index', {title: 'Express'});
};

BearController.prototype.noRouter = function(req, res, next) {
    let err = new Error('Not Found');
    err.status = 404;
    next(err);
};

BearController.prototype.retError = function(err, req, res, next) {
    // set locals, only providing error in development
    res.locals.message = err.message;
    res.locals.error = req.app.get('env') === 'development' ? err : {};

    // render the error page
    res.status(err.status || 500);
    res.render('error');
};

bearcat.module(BearController, typeof module !== 'undefined' ? module : {});
