0

How does a meteor application deal with server-side methods for inserting and updating? especially:

  1. if an application is temporarily offline (available through appCache-package) and a call to a server-side method happens: is optimistic-ui possible? how does it work?
  2. do i need to define the (usually server-side) methods in /libs directory instead of /server?

Thank you

tgogos
  • 23,218
  • 20
  • 96
  • 128
elCapitano
  • 1,821
  • 3
  • 22
  • 42

1 Answers1

0
  1. You should put your collections under libs and use Collection.allowand Collection.deny to control the permission on both server and client side.

In meteor, most of the time you're dealing with client side data, Meteor will save them to the Minimongo and synchronize your update to server when available.

enter image description here

  1. Regarding to method definition, it really depends on where you want to use it, only a few things you'll put on server, e,g, authentication logic, encryption salt
Community
  • 1
  • 1
Ryan Wu
  • 5,963
  • 2
  • 36
  • 47
  • Thanks, i saw this picture on the docs too. I was asking if meteor can deal with server-side methods when calling them in "offline" mode. I guess a "server only" method (not in `/libs`) can't be detected by the optimistic-ui, or? – elCapitano Aug 06 '15 at 18:07