Drake Guan
Drake Guan

Reputation: 15152

Make a RPC from a client in meteor?

I'm wondering if I can make a RPC to meteor server from a client?

The context is that I like to get a list of files in server, something like the following:

// in server
var listdir = function() {
}

// in client
files = SERVER.listdir();

Upvotes: 1

Views: 681

Answers (1)

Nachiket
Nachiket

Reputation: 6187

Example code for calling server method: https://gist.github.com/2964422
Demo : http://servercall.meteor.com/
Meteor Documentation: http://docs.meteor.com/#methods_header

Upvotes: 2

Related Questions