I am using infura web3 provider in ethereum but I don't want to use third party providers in my project so I want to use localhost:8545? how to use this provider? Is it connect to the ethereum node? what is difference between localhost and infura?
Infura is a Blockchain provider which enables you to interact with Ethereum without running a node. If you want to interact with the Blockchain by your own you have to setup a node using clients such as Geth or Parity.