0 down vote favorite I am using express and web3 while i get the blockNumber it returns { [Function: get] request: [Function: bound ] }
my code is
var express = require('express');
var app = express();
const Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'))
app.get('/', function(req, res) {
let Block = web3.eth.getBlockNumber
console.log(Block);
res.send("It is me");
});
But i need the block number
let Block = web3.eth.getBlockNumber, which obviously returns an object containing a function. – goodvibration Dec 06 '18 at 10:01