Which methods are available via DDP in Meteor? -
when communicating meteor server on ddp, i've found following methods available:
- if have defined method
mymethod
inmeteor.methods({ ... })
{"msg":"method","method":"mymethod","params":[],"id":"1"}
- if have enabled
accounts-password
package{"msg":"method","method":"createuser","params":[{ ... }],"id":"1"}
{"msg":"method","method":"login","params":[{ ... }],"id":"1"}
- if there exists collection called
mycoll
on server{"msg":"method","method":"/mycoll/insert","params":[{"_id":"some-doc"}],"id":"1"}
{"msg":"method","method":"/mycoll/update","params":[{ ... }],"id":"1"}
{"msg":"method","method":"/mycoll/remove","params":[{"_id":"some-doc"}],"id":"1"}
what available, example, {"msg":"method","method":"/mycoll/find","params":[{"_id":"some-doc"}],"id":"1"}
, however.
so there documentation methods available? couldn't find any, , have found trying lots of possibilities.
this undocumented, if want see full list of available methods can add following code 1 of server files within meteor app , it'll display sorted list of defined meteor.methods
handlers @ command line, including collections , packages:
meteor.startup(function() { console.log(object.keys(meteor.server.method_handlers).sort()); });
granted, doesn't provide documentation, it'll let see what's available.
Comments
Post a Comment