In a meteor, all methods described by Meteor.methods can be called from the client. In this sense, there are no private methods, since the goal of an RPC call is for the client to make the call.
If you want to use the 'private' method, you can use the regular JavaScript method. If you define a method using var , it will be available only in the file and cannot be called with the client.
var yourmethod = function() { ... }
which is equivalent to:
function yourmethod() { ... }
Or you can define it so that any of your script servers can use it:
yourmethod = function() { .... }
If you want the RPC method call to be accessible only from javascript code, but not from the javascript console in chrome, this is not possible. This is because the idea of ββmeteoric all RPCs from the client is not trusted, and there is no way to distinguish whether it came from the console or not. You can use meteor user authentication or Collection.allow or Collection.deny methods to prevent any unauthorized changes in this way.
Akshat
source share