I've managed to get my handlebars working in a node+express app and loading in data from tweets based on a hashtag which I'm retrieving no problems and rendering the tweets on the page the first time no problem.
The issue I have now is trying to update the template with new tweets that come in.
I have in my routes the 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 the rendering and getTweets method and when console logging I do see my response from Twitter with the latest tweets but the template isn't updating.
Any help would be greatly appreciated.
Thanks
Tom