[object Object]
<h1>
<% for (var i = 0; i < sms.length; i++) { %>
<p><%= sms[i].text %></p>
<% } %>
</h1>
var reqDB = 'SELECT * FROM messages';
var sms = db.query(reqDB, (err, result) => {
if (err) throw err;
console.log(result);
});
// Chat
app.get('/chat', function (req, res) {
res.render('chat', {
sms
})
});