Meteor Js : How to calling synchronous methods ?

For do this you need use Future.

Create :

var Future = Npm.require( 'fibers/future' ); 

In your call use :

 if ( error ) {
        future.return( error );
      } else {
        future.return( response );
      }
}

To take the response : future.wait();

Example :

Screen Shot 2015-08-23 at 6.39.05 PM

4 Comments

  1. Nice post. I was checking continuously this blog and I am impressed! Extremely helpful info particularly the last part 🙂 I care for such information much. I was seeking this particular info for a long time. Thank you and good luck.

    Like

  2. Have you ever considered publishing an e-book or guest authoring on other websites?
    I have a blog centered on the same ideas you discuss and would
    really like to have you share some stories/information. I know my subscribers would value your work.

    If you’re even remotely interested, feel free to send me an e mail.

    Like

Leave a comment