You use Meteor.callSync
and Meteor.applySync
exactly as their counterparts, Meteor.call
and Meteor.apply
.
Note - this package requires using the 1.2-rc.16 Meteor release.
This package makes use of two undocumented options for calling Meteor Methods. The first is the returnStubValue
which will cause the return value from a Meteor method stub to actually be returned instead of undefined
. The second is the recently created throwStubExceptions
option. With this option, Meteor method stubs will throw exceptions instead of logging them to the console. If an exception is thrown, the method will not be run on the server. Meteor.callSync
and Meteor.applySync
sets these options to true
so you don't have to remember to.