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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -