0

I have deployed geth, truffle, testrpc whichever needed in live AWS server. All the configurations are working properly. I have initiated 'truffle develop' and 'npm run dev'. Both are working fine. Now, 'npm run dev' started in http://localhost:8080, I need to connect it in browser with http://x.x.x.x:8080. x.x.x.x - which is IP of AWS server.

Question: When i am trying to connect in this way, it is not loading in the browser. What i have to do further?

Verified AWS port, it is open.

I don't know how difficult this question, but struggling with this. Any help will be appreciated.

OUTPUT from my terminal after running

Project is running at http://localhost:8081/
webpack output is served from /
Hash: 571d202a1c658d7dbdfd
Version: webpack 2.7.0
Time: 1726ms
---
---
---
webpack: Compiled successfully.

This is from my AWS server console. Now i have to connect to that ip and port with browser.

0

Creating a custom Network

# Step 1: Get a contract into my application
var json = require("./build/contracts/MyContract.json");

# Step 2: Turn that contract into an abstraction I can use
var contract = require("truffle-contract");
var MyContract = contract(json);

# Step 3: Provision the contract with a web3 provider
MyContract.setProvider(new Web3.providers.HttpProvider("http://192.168.0.1:8545"));

# Step 4: Use the contract!

MyContract.deployed().then(function(deployed) {
  return deployed.someFunction();
});

Try it Thanks You!

  • Thanks for the reply. But, I'm not getting it. I have deployed sample contract of metacoin provided. Truffle is running fine, no issues as well as npm run also. Only thing i'm struggling is can't able to connect it in the browser. Am using dev network. – Ram Jan 24 '18 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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