github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/docs/example/basic-app-website/README.md (about)

     1  # Example App (& Website)
     2  
     3  Note that this example is the same as the the basic-app example, apart from step 3.
     4  
     5  This example contains an example solidity contract [simplestorage](simplestorage.sol) and a [node.js application](app.js) that interacts with the contract using [burrow](../../../js/README.md). It also contains a [makefile](makefile) that will set up a single node chain, deploy the contract using `burrow deploy`. The node app configures itself to use the the single node chain my looking for [account.json](account.json) and [deploy.output.json](deploy.output.json) files that are emitted by `burrow deploy` and the makefile.
     6  
     7  The makefile provides some examples of using the `burrow` command line tooling and you are invited to modify it for your purposes (i.e. change from linux target to darwin)
     8  
     9  ## Dependencies
    10  To run the makefile you will need to have installed:
    11  
    12  - GNU Make
    13  - Node.js (the `node` binary)
    14  - npm (the node package manager)
    15  - jq (the JSON tool)
    16  - GO
    17  - Solc (solidity compiler)
    18  
    19  Burrow will be downloaded for you when using the makefile, but you may override `BURROW_BIN` and `BURROW_ARCH` in the makefile to change this behaviour. By default Burrow is downloaded for `Linux_x86_64.
    20  
    21  ## Running the example
    22  
    23  All commands should be run from the same directory as this readme file.
    24  
    25  ### Step one
    26  Start the chain
    27  
    28  ```shell
    29  make start_chain
    30  ```
    31  
    32  This will install burrow, create a new chain as necessary.
    33  
    34  If successful you will see continuous output in your terminal, you can shutdown Burrow by sending the interrupt signal with Ctrl-C, and restart it again with whatever state has accumulated with `make start_chain`. If you would like to destroy the existing chain and start completely fresh (including deleting keys) run `make rechain`. If you would like to keep existing keys and chain config run `make reset_chain`.
    35  
    36  You can redeploy the contract (to a new address) with `make redeploy`. The node app will then use this new contract by reading the address deploy.output.json. Be sure to do this if you wish to modify simplestorage.sol.
    37  
    38  ### Step two
    39  Leave burrow running and in a separate terminal start the app which runs a simple HTTP server with:
    40  
    41  ```shell
    42  make start_app
    43  ```
    44  
    45  This will deploy the contract if necessary, install any node dependencies, and then start an expressjs server, which will run until interrupted.
    46  
    47  ### Step three
    48  Open a web browser and type:
    49  
    50  ```shell
    51    http://localhost:3000/
    52  ```
    53  
    54  You will see two buttons:
    55  * Set Value - that allows you to change the value stored in the associated smart contract
    56  * Get Value - that allows you to retrieve the value stored in the associated smart contract, which will be displayed underneath the button
    57