mbrash / geodude

geodude
0 stars 0 forks source link

Limit server messages per zip code. #4

Closed mbrash closed 9 years ago

mbrash commented 9 years ago

After a certain number like 100 msgs in the server array we need to clean up old ones.

So when msgs.length > 100 --> msgs.splice(1) - this will remove the oldest message. That way we keep data small.