Skeleton for building a Hyperledger Fabric database app
brew install jq
sudo apt install jq
-
Configure environment
make config.env
Edit config.env to taste (see below for Blockdaemon CA-server setup)
-
Build binary and make credentials:
make
-
Create/update/join channel, then install/instantiate chaincode (only have to do this once):
./app init
./app webapp
It should be visible here: http://localhost:3001
./app set hello world
./app get hello
./app store <key> <sample-file>
./app fetch <key> out
diff <sample-file> out
pushd $GOPATH/src/github.com/Blockdaemon/hlf-service-network
docker-compose down
popd
make clean-cc
Set DISABLE_MATCHERS=_
in config.env
, rerun make
cp examples/config-ca.env config.env
Edit config.env
to taste, then add CA server admin creds to ca-client/local.env
:
CA_USER=<adminuser>
CA_PASS=<adminpass>
Make it a bit more secure, then run make:
chmod og-rw ca-client/local.env
make
- You may need to check out the repo in your
GOPATH
or chaincode installation may not work. - If you change
config.env
, and you are usingca-client
, you may need torm -rf ca-client/crypto-config
.app get/set
may hang waiting for the transaction ack event. For some reason they go missing sometimes. CTRL-C to abort, the transaction usually went through
Based on the chainhero.io tutorial.
Requires a service network or a Blockdaemon hosted HLF network