I am using Web3 v1.2.1 with nodejs v10 and following this link. I am having issue connecting with metamask,below is my code snippet:
const Web3 = require('web3')
const window = require('window');
const web3 = new Web3(window.Web3.currentProvider);
The error says TypeError: Cannot read property 'currentProvider' of undefined
I want to access the address from metamask, can someone help me with it