0
// index.pug
p #{polls}
// apiendpoint
http://localhost:8080/api/polls
// маршруты файл (index.js):
Вот, как я make получить запрос к api и передать полученный результат от api (locals) к переменной polls при рендеринге profile.pug
app.route('/profile')
.get(isLoggedIn, function (req, res) {
res.render('profile', {'polls': passvaluehere});
});
});