oortcloud / unofficial-meteor-faq

The unofficial Meteor FAQ
953 stars 94 forks source link

Location of Meteor.methods #11

Closed matb33 closed 12 years ago

matb33 commented 12 years ago

I'm about to give your folder structure a try as recommended in the FAQ, and I noticed that you suggest storing Meteor.methods under server/:

server/methods.js       # <- Meteor.method definitions

I have traditionally kept Meteor.methods in a shared area so the client and server pick up the same methods (client runs as stub etc). If I need to do something specific for the client vs server in the Meteor.method function, I leverage this.isSimulation (http://docs.meteor.com/#method_issimulation)

Thoughts?

tmeasday commented 12 years ago

Thanks very much!