Skip to content

Instantly share code, notes, and snippets.

@carlosrodriguez
Created August 26, 2012 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosrodriguez/3483962 to your computer and use it in GitHub Desktop.
Save carlosrodriguez/3483962 to your computer and use it in GitHub Desktop.
Meteor Method Call
// Server
Meteor.methods({
foo: function() {
return 1;
},
bar: function(arg) {
return "test";
}
});
// Client
var sel = {id: 1};
Meteor.call('bar', sel, function(error, result) {
console.log(error);
return console.log(result);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment