Skip to content

Instantly share code, notes, and snippets.

//RedirectionRequest is an entity within my application
setInterval(function(){
var groupedRedirectionRequests = RedirectionRequest.map(
function(){emit(this.shortUrl, 1);}
).reduce(
function(k, values){var sum = 0; for(var v in values){sum += values[v];} return sum;}
).select();
websocket.sendMessageToAllUsers(JSON.stringify(groupedRedirectionRequests));
}, 1000);
{
"lastUpdate": "2017-06-29",
"AT": {
"minIOSAppVersion": "2.6.2",
"minIOSVersion": "9.0.0",
"iOSUpdateUrl": "https://itunes.apple.com/at/app/george-go/id947829367",
"minAndroidAppVersion": 7041,
"minAndroidVersion": 16,
"androidUpdateUrl": "https://play.google.com/store/apps/details?id=at.erstebank.george",
"maintenance": {