Skip to main content
Became Hot Network Question
added 1 character in body
Source Link
Shane Fontaine
  • 18.3k
  • 20
  • 56
  • 83

In the backend of a Web application I have to communicate with the public Ethereum Blockchain.

On local development machine, I run ganache as testrpc and connect with such a line of code:

web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));

I've also found out that I can develop against RinkeByRinkeby testnet with:

web3 = new Web3(new Web3.providers.HttpProvider("https://rinkeby.infura.io/$thisistheapikey"));

But how can I communicate with the REAL public Blockchain? Do I need to run geth on the Web server and connect to its instance? Or is there any public network available that could be used? (if we can trust it)?

In the backend of a Web application I have to communicate with the public Ethereum Blockchain.

On local development machine, I run ganache as testrpc and connect with such a line of code:

web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));

I've also found out that I can develop against RinkeBy testnet with

web3 = new Web3(new Web3.providers.HttpProvider("https://rinkeby.infura.io/$thisistheapikey"));

But how can I communicate with the REAL public Blockchain? Do I need to run geth on the Web server and connect to its instance? Or is there any public network available that could be used? (if we can trust it)

In the backend of a Web application I have to communicate with the public Ethereum Blockchain.

On local development machine, I run ganache as testrpc and connect with such a line of code:

web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));

I've also found out that I can develop against Rinkeby testnet with:

web3 = new Web3(new Web3.providers.HttpProvider("https://rinkeby.infura.io/$thisistheapikey"));

But how can I communicate with the REAL public Blockchain? Do I need to run geth on the Web server and connect to its instance? Or is there any public network available that could be used (if we can trust it)?

Source Link
delete
  • 327
  • 4
  • 12

How to connect with public Ethereum Blockchain on a backend/web server?

In the backend of a Web application I have to communicate with the public Ethereum Blockchain.

On local development machine, I run ganache as testrpc and connect with such a line of code:

web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));

I've also found out that I can develop against RinkeBy testnet with

web3 = new Web3(new Web3.providers.HttpProvider("https://rinkeby.infura.io/$thisistheapikey"));

But how can I communicate with the REAL public Blockchain? Do I need to run geth on the Web server and connect to its instance? Or is there any public network available that could be used? (if we can trust it)