Traveling data from a query to the BD in Jade does not show them

0

I have a route where I make a query to the database, to try to send them to view in this way

router.get('/all', (req, res, next) => {
    connection.query('SELECT * FROM users', (err, rows, fields) => {
        res.render('index', { rows: 'rows' })
    });
});

Later from the view I try to traverse the values in this way

doctype html
html
  head
    title= title
    link(rel='stylesheet', href='/stylesheets/style.css')
  body
  ul
  each value in rows
      li = value.nameUser

It does not show me errors, but instead of showing me the results; I see the following

= value.nameUser
= value.nameUser
= value.nameUser
= value.nameUser

I would like you to help me identify why, thank you

    
asked by element 17.11.2018 в 06:17
source

0 answers