Meteor Methods
Explore how to define and call Meteor Methods in Meteor.js to enable secure and reactive data handling between client and server. Understand method naming conventions, parameter validation using the check package, and how to execute methods with callbacks. This lesson helps you build real-time, full-stack applications by managing data insertion and server interactions effectively.
We'll cover the following...
We'll cover the following...
Defining Meteor Methods
Meteor Methods are defined by the Meteor guide as RPC systems similar to REST APIs or HTTPs. A Meteor Method is like a POST request to a server. Meteor Methods run on both the client and server.
Syntax in Method
Meteor.methods({
"links.insertNewLink": function (){
//this function runs when the method
//is called on the
//client
}
});
Meteor Methods contain a function that takes an object. Each key of the object represents a function that ...