Meteor method defined in lib, can't be found under server/lib -


i have method defined in lib/methods.js:

meteor.methods({     gettask: function( extraparam ) {         return {dummy: 'dummy'};     } }); 

but when call server/lib/environment.js:

meteor.call( "gettask", extraparam ); 

i'm getting method not found, under impression lib/ loaded before server/lib,
or should call method in server/main.js ?

with respect issue, load order rules work follows:

  1. paths containing lib gain priority.
  2. paths gain priority based on depth.

combining 2 shows /server/lib/x.js loaded before /lib/x.js. methods shouldn't issue unless method invoked containing file executed.

your options are:

  1. fix load order moving call suggested. main.js loaded last work.
  2. call method within meteor.startup callback.

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -