(function () {
    "use strict";

    var ECT = require('ect'),
        config = require('config');

    var ect = ECT({root: config.views.dir+'/admin', ext: '.ect'});
    //var ect = ECT({root: '/var/www/development/test/app/views', ext: '.ect'});

    module.exports = {

        index: function * (next) {
            var template = ect.render('mainPage',{});
            this.body = template;
            yield next;
        },
        tmp : function * (next){
            var newsManager = require('../managers/newsManager');
            yield newsManager.insertNews();
            yield next;
        }
    }
}());