AngularJS 1.6, Node.js 6.2.1, MongoDB 2.6.10
I have a playlist of music. There are approximately 200 tracks. The playlist plays one track after another while my web page is open and then starts with the first track when the last one is ended.
Now I want to have more tracks in the playlist. But there is a delay before my web page starts if I get more then 200 JSON documents (a document has many fields) from my MongoDB. In a document I have links to a track and some additional info. The more documents I get, the bigger delay I have. So I have hardcoded limit for 200 track now myDB.findRandom({}, {}, {limit: 200}, function(err, hyperlinks) {...});
It would be nice to be able to periodically expire some tracks and to load new ones while the web page is still open.
What AngularJS or Node.js tech can you advise me to refresh my playlist periodically?