Selecting a web3 provider

When we load a web page, we need to connect to a web3 provider. If you have already installed a provider such as MetaMask, you can use your correct provider option, as follows:

App.web3Provider = web3.currentProvider;

In our crowdfunding example, for the sake of simplicity, we will directly connect to our local Ganache server, as follows:

App.web3Provider = new Web3.providers.HttpProvider('http://localhost:8545');