Using node ddp-client to insert into a meteor collection from Node

前端 未结 2 930
余生分开走
余生分开走 2020-12-12 19:54

I\'m trying to stream some syslog data into Meteor collections via node.js. It\'s working fine, but the Meteor client polling cycle of ~10sec is too long of a cycle for my t

2条回答
  •  半阙折子戏
    2020-12-12 20:33

    According to this screencast its possible to simply call the meteor-methods declared by the collection. In your case the code would look like this:

    ddpclient.call('/counts/insert', [{hits: 1111}], function(err, result) {
        console.log('called function, result: ' + result);
    })
    

提交回复
热议问题