node.js - update handlebars template with new data in node+express -
i've managed handlebars working in node+express app , loading in data tweets based on hashtag i'm retrieving no problems , rendering tweets on page first time no problem.
the issue have trying update template new tweets come in.
i have in routes following code:
new twitter.twitterstream().gethashtagstream(tweetsretrieved); function tweetsretrieved(tweets) { twittersearchresults = tweets; } module.exports = function(app) { app.get('/', function (req, res){ res.render('index', twittersearchresults); }); }; i've tried setintervals around rendering , gettweets method , when console logging see response twitter latest tweets template isn't updating.
any appreciated.
thanks
tom
Comments
Post a Comment