How can I systematically add a time stamp to new documents in Meteor? -


when new document inserted collection, i'd add time stamp it. want server this, not client. best solution here?

rem: i'd rather not implement own custom meteor.methods() this, use classical meteor.collection.insert() method

from here - https://github.com/oortcloud/unofficial-meteor-faq

blockquote

how can alter every document before added database?

there isn't support right now, can use deny achieve want on server. example, timestamp each document goes mongo:

posts.deny({   insert: function(userid, doc) {       doc.createdat = new date().valueof();       return false;  }})  

```


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -