【发布时间】:2015-06-18 12:23:29
【问题描述】:
Router.route('/sms/inbound', function () {
if (something) {
Meteor.call("addUser", {
name: "hello",
age: 20
})
}
}, {where: 'server'});
我想做类似上面的事情。但是,由于在客户端使用Meteor.call 来调用服务器端函数,所以对我来说似乎不合适。在集合中,您通常会在 Meteor.methods 块内定义像 addUser 这样的方法。我应该如何从服务器端调用这个函数?
【问题讨论】:
标签: meteor