title: Meteor: passing variable from server to client
body: <p>I want to pass a variable from server side to a template in the client side.
  In main.html, I have this template:</p>
  
  <pre><code>&lt;template name="hello"&gt;
    ...
    &lt;p&gt;{{privateKey}}&lt;/p&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>In main.js, I want something like:</p>
  
  <pre><code>if (Meteor.isClient) {
      Template.hello.helpers({
          privateKey : function () {
              return 'call to function makePrivateKey';
          }
      });
  }
  
  if (Meteor.isServer) {
      Meteor.methods({
          makePrivateKey: function() {
              var privKey = bitcoinjs.ECKey.makeRandom();
              return privKey.toWIF();
          }
      });
  }
  </code></pre>
  
  <p>How can I invoque the function makePrivateKey from server side and print
  the private key in my template ?
  I don't want to use session variable or dynamic variable.</p>