运行第一个Hyperledger Fabric程序

1.下载fabric源码。建立相应的文件目录,下载源码仓库。或者只下载download-dockerimages.sh

mkdir -p ~/go/src/github.com/hyperledger
cd ~/go/src/github.com/hyperledger
git clone https://github.com/hyperledger/fabric.git
cd fabric
git checkout release-1.1

2.使用download-dockerimages.sh,下载fabric镜像文件

cd examples/e2e_cli/
source download-dockerimages.sh -c x86_64-1.1.0 -f x86_64-1.1.0

3.下载fabric-samples源码

cd ~/go/src/github.com/hyperledger
git clone https://github.com/hyperledger/fabric-samples.git

4.运行balance-transfer。
1.修改package.json中的fabric-client和fabric-ca-client的版本为1.1.0。新增grpc:1.9.1,防止出现Cannot read property 'getConnectivityState' of undefined

2.按照README.md进行安装。

cnpm install
docker-compose -f artifacts/docker-compose.yaml up -d
PORT=4000 node app

5.使用POSTMAN进行测试
image

6.远程调试源码
启动应用,获取uuid

node --inspect app.js

image

远程端口映射

ssh -L 9221:localhost:9229 u1@192.168.181.136

进入调试页面

chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=localhost:9221/0867e9ef-36b9-4468-805d-0c67db284198

7.运行testAPIs.sh
安装jq

sudo apt-get install jq

运行testAPIs.sh

./testAPIs.sh

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值