1234567891011121314151617181920212223 |
- 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
- });
- }
- });
- };
|