Here are my codes:
app.get('/index/:name',function(req, res){
connection.query('SELECT * FROM deneme',function(err, rows, fields){
if (err) throw err;
var paragraf = rows;
});
res.render('index', {
title: req.params.name,
para: paragraf
});
});
But node can't reach 'paragraf' variable from inside of 'res.render'. Node returns
ReferenceError: paragraf is not defined
How can i reach paragraf variable from outside of asynchronous functio?