The majority of communications we perform between the client and server in Meteor is done via DDP. There are times, however, where direct server calls can come in very handy. For example, while you're testing, or as an admin, you may create some 'hidden'
helper methods to make debugging easier. In other instances, you may want to make very secure or very simple methods available to reduce the vulnerability or complexity of your code. In any case, server methods are a staple of development, and this recipe will walk you through creating and using server-side methods, using the Meteor.methods()
function.
To create server methods, we first need a basic application. We'll quickly create a color swatch app. Nothing fancy, but once we're done, we will be able to create server methods with good visual feedback.