123456789101112131415161718192021222324252627 |
- let Watch = require('../models/Watch');
- /* Nunjucks custom filter */
- var nunjucks = require('nunjucks');
- var env = new nunjucks.Environment();
- /**
- * GET /
- */
- exports.index = function(req, res) {
- Watch.find({}, null, {sort: '-year'}, function(err, watch){
- if(err){
- console.log(err);
- } else {
- res.render('inicio', {
- title:'Início',
- watch: watch
- });
- }
- });
- };
|