create account

How to run a simple Ethereum Dapp on Windows in a local testnet in 15 minutes! by frostfractal

View this thread on: hive.blogpeakd.comecency.com
· @frostfractal ·
$0.08
How to run a simple Ethereum Dapp on Windows in a local testnet in 15 minutes!
<html>
<p>Here is a simple tutorial to running an Ethereum Decentralized App in 15 minutes! Solidity and Web3 can be daunting programming languages to learn, but let us see how to compile code and use the Truffle framework. In this tutorial we will use Truffle's existing package for testing purposes. It is a simple Dapp that creates a token on the testnet that does nothing, but can be sent between accounts.</p>
<p><img src="https://i.stack.imgur.com/jzm8y.png" width="551" height="412"/></p>
<h3>Tutorial (7 Steps)</h3>
<ol>
  <li>Download Node Package Manager, npm. This will help you install Ethereumjs-testrpc and Truffle: <a href="https://nodejs.org/en/">https://nodejs.org/en/</a></li>
  <li>Open a command prompt window and use the following two commands:<br>
<code>npm install -g ethereumjs-testrpc</code><br>
<code>npm install -g truffle</code></li>
  <li>3. Install the Metamask plugin for Chrome<br>
<a href="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en">https://chrome.google.com/webstore/detail/metamask/</a></li>
  <li>Open 2 separate Windows Powershell windows (Using Command Prompt may result in some javascript errors)</li>
  <li>In the first window, run the command:<br>
<code>testrpc<br>
</code><img src="https://steemitimages.com/DQmaX9CaFZcZHdhcqSjBpj8SRihbYzsrBwBXXTvGuGyyxav/image.png" width="1103" height="789"/></li>
  <li>In the second window, run the commands. These commands might take a while:<br>
<code>mkdir MyDappFolder<br>
cd MyDappFolder</code><br>
<code>truffle init webpack</code><br>
<code>truffle migrate</code><br>
<code>npm run dev</code><br>
<img src="https://steemitimages.com/DQmWa1dbGyHEAC8RNE6Pu799fvpNd2GUqPCmXCK9fRGmi5F/image.png" width="1103" height="1030"/></li>
  <li>Use the Chrome browser and go to the address <a href="http://localhost:8080/">http://localhost:8080/</a>. Set the Metamask plugin from the Ropsten/Main Net to Localhost 8454. You should see something like this:<br>
<img src="https://steemitimages.com/DQmbkfB6G5oD7JzDikJDYqmCNedqGeDntT2MeezEcQ66Gsh/image.png" width="797" height="529"/></li>
</ol>
<p>Congrats! You have deployed a Dapp to your local testnet! You can now use the Ethereum RPC to send some test Ether to yourself and play around with the MetaCoin tokens. Note that if you want to create a publicly usable Dapp, you will have to work on the Ropsten net, then the Ethereum main net.</p>
<p>(Disclaimer: All credits for the source code of the software goes to <a href="http://truffleframework.com/">Truffle</a> and <a href="https://www.ethereum.org/">Ethereum</a> developers. I am simply publishing a tutorial on how to use them)</p>
<p><br></p>
</html>
👍  , , , , , , , , ,
properties (23)
authorfrostfractal
permlinkhow-to-run-a-simple-ethereum-dapp-on-windows-in-a-local-testnet-in-15-minutes
categoryethereum
json_metadata{"tags":["ethereum","cryptocurrency","dapp","life","blog"],"image":["https://i.stack.imgur.com/jzm8y.png","https://steemitimages.com/DQmaX9CaFZcZHdhcqSjBpj8SRihbYzsrBwBXXTvGuGyyxav/image.png","https://steemitimages.com/DQmWa1dbGyHEAC8RNE6Pu799fvpNd2GUqPCmXCK9fRGmi5F/image.png","https://steemitimages.com/DQmbkfB6G5oD7JzDikJDYqmCNedqGeDntT2MeezEcQ66Gsh/image.png"],"links":["https://nodejs.org/en/","https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en","http://localhost:8080/","http://truffleframework.com/","https://www.ethereum.org/"],"app":"steemit/0.1","format":"html"}
created2017-08-09 05:10:00
last_update2017-08-09 05:10:00
depth0
children0
last_payout2017-08-16 05:10:00
cashout_time1969-12-31 23:59:59
total_payout_value0.077 HBD
curator_payout_value0.007 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,681
author_reputation1,313,246,463,804
root_title"How to run a simple Ethereum Dapp on Windows in a local testnet in 15 minutes!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,248,852
net_rshares23,403,243,825
author_curate_reward""
vote details (10)