user87167: I have used bitcoin-core package in node js to get the information about the block detail using rpc command. 
For example:
var Client = require('bitcoin-core');

const client = new Client({ headers:'false', host:'127.0.0.1', network:'testnet', password:'xxxx',port:'18332', ssl: {
    enabled: false,
    strict: false
  }, timeout:'3000', username:'xxxx' });

client.getBlockchainInformation().then((help) => console.log(help));

It throws below mentioned error:
unhandled rejection rpcerror: not found

Any solution for this.
Thanks in advance.

user60443: The function client.getBlockchainInformation and the other methods exposed by the bitcoin-core npm module use bitcoin-core's REST interface. In order to use it, however, it must be enabled when you start bitcoind with the -rest flag.

The REST API can be enabled with the -rest option.
The interface runs on the same port as the JSON-RPC interface, by
  default port 8332 for mainnet, port 18332 for testnet, and port 18443
  for regtest.

e.g.:
$ bitcoind -rest
or in bitcoin.conf
rest=1


87167: <p>I have used bitcoin-core package in node js to get the information about the block detail using rpc command. </p>

<p>For example:</p>

<pre><code>var Client = require('bitcoin-core');

const client = new Client({ headers:'false', host:'127.0.0.1', network:'testnet', password:'xxxx',port:'18332', ssl: {
    enabled: false,
    strict: false
  }, timeout:'3000', username:'xxxx' });

client.getBlockchainInformation().then((help) =&gt; console.log(help));
</code></pre>

<p>It throws below mentioned error:</p>

<pre><code>unhandled rejection rpcerror: not found
</code></pre>

<p>Any solution for this.</p>

<p>Thanks in advance.</p>
 60443: <p>The function <code>client.getBlockchainInformation</code> and the other methods exposed by the <code>bitcoin-core</code> <code>npm</code> module use <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/REST-interface.md" rel="nofollow noreferrer">bitcoin-core's REST interface.</a> In order to use it, however, it must be enabled when you start <code>bitcoind</code> with the <code>-rest</code> flag.</p>

<blockquote>
  <p>The REST API can be enabled with the -rest option.</p>
  
  <p>The interface runs on the same port as the JSON-RPC interface, by
  default port 8332 for mainnet, port 18332 for testnet, and port 18443
  for regtest.</p>
</blockquote>

<p><strong>e.g.</strong>:</p>

<p><code>$ bitcoind -rest</code></p>

<p>or in <strong>bitcoin.conf</strong></p>

<pre><code>rest=1
</code></pre>
