Skip to content

Instantly share code, notes, and snippets.

@EranSch
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EranSch/ef8a8d777b05980a0f17 to your computer and use it in GitHub Desktop.
Save EranSch/ef8a8d777b05980a0f17 to your computer and use it in GitHub Desktop.
RedditHeadlines
var url = 'http://www.reddit.com/r/all.json',
redditData = {};
var redditGetter = function(){
http.get(url, function(res) {
var body = '';
res.on('data', function(chunk) {
body += chunk;
});
res.on('end', function() {
redditData = JSON.parse(body);
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment