MENU

A Webpage for Selling Energy to your Neighbour

May 4, 2017
0
6047
0

It may seem like not a big deal but it’s the little things that count. I decided to build a simple webpage that displayed the same figures that could be seen on the command line but there was just something about the familiarity with seeing a webpage versus seeing a terminal screen.

 

As you can see the values are the same but it added a bit more work. It was worthwhile though. The trick with getting a webpage to talk to the blockchain and display the information is to use javascript to create a connection to testrpc on port 8545 in this case and to contract address and update this each time you deploy the contract.

The source code is available at https://github.com/seandotau/mpower where it should be self explanatory if you have some basic javascript skills.

Leave a Comment!

Your email address will not be published. Required fields are marked *