Access multichain response in view

0 votes

Im using the https://github.com/scoin/multichain-node multichain-node package. Im trying to access the methods on the client side. 

app.js:

var multichain = require("multichain-node")({
  port: 5748,
  host: '0.0.0.0',
  user: "user",
  pass: "passwd"
});

multichain.getInfo(function (err, info) {
  if (err) {
    throw err;
  }
  console.log(info);
});

Running from the command line I see the response in the console. How do I access this object in a handlebars template or as a JSON object on the front end?

asked Jul 11, 2016 by Geo

1 Answer

0 votes
The answer is to setup routes on the server side and use AJAX calls to those routes to get the data.. FIgured it out all by myself :)
answered Jul 12, 2016 by gravyplaya
...