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