please note, this repository contains versions that are compatible with the different versioned releases of Holochain. The main branch, develop, will track with the develop branch of
holochain-rust. Please note that it may not always be up to date, since the
develop branch gets new commits daily.
For the version compatible with
0.0.4-alpha, please checkout the master branch.
*Simple app for doing multi-node testing
This app was built to do multi-node testing of the same DNA from one user interface.
Install the Holochain command line dev tool by following the instructions here: https://developer.holochain.org/start.html
Clone this repo:
git clone https://github.com/holochain/simple-app
- Make sure things are working by running the tests:
cd simple-app hc test
Install the n3h networking component
Compile the DNA:
- Run two instances of it specifying the install directory for n3h (in the examples below this is
/home/eric/holochain/n3h). First, in one terminal window, run the first node on port 8888 like this:
HC_N3H_PATH=/home/eric/holochain/n3h hc run --port 8888
Note the network address that is created for the node, you should see something like:
READY! tcp://127.0.0.1:40197 ["/ip4/127.0.0.1/tcp/46513/ipfs/Qmd7SXFpgr16kkEVHxmRR1csB8CYwsN79vBtdNvmKQBBwi", "/ip4/192.168.1.5/tcp/46513/ipfs/Qmd7SXFpgr16kkEVHxmRR1csB8CYwsN79vBtdNvmKQBBwi"]
Then, in another terminal window (from the same directory), run the second node on port 8889 using a different agent name and the address from the first node as the bootstrap node like this:
HC_N3H_BOOTSTRAP_NODE=/ip4/192.168.1.5/tcp/46513/ipfs/Qmd7SXFpgr16kkEVHxmRR1csB8CYwsN79vBtdNvmKQBBwi HC_AGENT=testAgent2 HC_N3H_PATH=/home/eric/holochain/n3h hc run --port 8889
- Finally to run the UI: simply open the
ui/index.htmlfile in a browser, and it should start communicating with the two instances of
NOTE: the repo also provides configuration files for running simple app using the
holochain conductor instead of use the
hc cli. You will have to edit the
n3h_path for where you installed it, as well as add the
bootstrap_nodes into the second config file each time you run the second node using the conductor.
Currently n3h process spawned by
hc run are not automatically killed when the run ends so you may have to kill them manually with
Holochain is an open source project. We welcome all sorts of participation and are actively working on increasing surface area to accept it. Please see our contributing guidelines for our general practices and protocols on participating in the community.
Copyright (C) 2019, Holochain Foundation
This program is free software: you can redistribute it and/or modify it under the terms of the license p rovided in the LICENSE file (GPLv3). This program is distributed in the hope that it will be useful, bu t WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Note: We are considering other 'looser' licensing options (like MIT license) but at this stage are using GPL while we're getting the matter sorted out. See this article for some of our thinking on licensing for distributed application frameworks.