2

I am launching a semi-decentralized webapp using AWS and was wondering if I must continually run a node on AWS for it to work. Currently, if I don't run a Rinkeby node and compile/migrate the contract in my AWS instance then it won't work, but I may just be doing something wrong.

Thank you.

2 Answers 2

1

Yes, to interact with the blockchain, you need to run a node.

1
  • But if you are just launching a web app why can't you migrate the contract to the blockchain from my local machine and just attach to it from AWS without having to run a node on AWS
    – connorvo
    Mar 2, 2018 at 1:14
1

You don't really need it in case you're just deploying contracts and interacting with it. You can migrate your contracts in the mainnet and use web3.js to call them from the webapp. All you need is your Contract ABI and the Contract address (which will be given to you after the deploy)

If your webapp doesn't add any specific functionality other than smart contract invocation you might consider to deploy it in IPFS and make it fully decentralized.

2
  • The issue I run into is that I am setting the provider for my contract as localhost:8545. So when I start-up the DApp, it connects to the contract but then is unable to interact with it because it wants to set the provider to localhost but if I am not running a node on my EC2 instance it can't do that
    – connorvo
    Mar 5, 2018 at 21:13
  • You need to get the provider that is injected by Mist or Metamask so you don't need to connect locally. github.com/ethereum/wiki/wiki/JavaScript-API#adding-web3 or if you use the new version: web3js.readthedocs.io/en/1.0/…
    – qbsp
    Mar 6, 2018 at 2:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.