Insight UI and Insight API Programitically


(Richard Macarthy) #1

Hi there, I have just installed bitcore node, and would like to start InsightUI and InsightAPI programtically the same as the other services packaged with Bitcore.

For example:

var Node= new bitcore.Node({
    datadir: './data',
    network: "testnet",
    "services": [{
        name: "address",
        module: Address,
        config: {}
    }, {
        name: 'bitcoind',
        module: Bitcoin,
        config: {}
    }, {
        name: 'db',
        module: DB,
        config: {}
    }, {
        name: 'web',
        module: Web,
        config: {
            port: 3001
        }
    }, {
      //Insight API and UI here??
   }]
});

Anyone know how to do this?

Thanks.

Richard.


(Braydon Fuller) #2

Yep. I believe the module for insight-api would be:

var InsightAPI = require('insight-api');

and for insight-ui it would be:

var InsightUI = require('insight-ui/bitcore-node');

(We may want to go ahead and export as main though)