text: const Article = require('../models/article')
  
  module.exports.index = (req, res) => {
      Article.find().sort({ createdAt: -1 })
      .then(result => {
          res.render('index', {title: 'Accueil', articles: result})
      })
      .catch(err => {
          console.log(err)
      })
  }
  