- Hyperledger Cookbook
- Xun (Brian) Wu Chuanfeng Zhang Andrew Zhang
- 169字
- 2021-06-24 14:59:36
How to do it...
To write your first application, follow these steps:
- Set up the development environment:
$ cd ~
cd fabric-samples/first-network
sudo docker ps
sudo ./byfn.sh down
sudo docker rm -f $(sudo docker ps -aq)
sudo docker network prune
cd ../fabcar && ls
You will notice that there are a few Node.js file present in fabcar folder such as enrollAdmin.js, invoke.js, query.js, registerUser.js, and package.json and all others packaged into one startFabric.sh file.
- Install the Fabric client:
$ sudo npm install -g npm@5.3.0
$ sudo npm update
You will notice from the following screenshot that the Fabric client 1.3.0 and Fabric CA client 1.30 packages are installed:

- Execute the following command to launch the network:
$ sudo ./startFabric.sh node
- Open a new Terminal to stream the Docker logs:
$ sudo docker logs -f ca.example.com
This will open the Docker file, which will look similar to the following screenshot:

Next, we will use the Node.js script to run, query, and update the records on Fabric network.
推薦閱讀
- 線性代數(shù)選講
- 小數(shù)學(xué)家應(yīng)該知道的數(shù)學(xué)故事
- Data Visualization:a successful design process
- 一個(gè)定理的誕生:我與菲爾茨獎(jiǎng)的一千個(gè)日夜
- 張梅玲:讓孩子受益一生的數(shù)學(xué)思維訓(xùn)練
- 數(shù)學(xué)原來(lái)可以這樣學(xué):初中篇
- CAE分析大系:ANSYS疑難問(wèn)題實(shí)例詳解
- 概率論與數(shù)理統(tǒng)計(jì)
- 燒腦的邏輯題
- 你沒(méi)想到的數(shù)學(xué)
- 現(xiàn)代啟發(fā)式優(yōu)化方法及其應(yīng)用
- Digital Forensics with Kali Linux
- 概率論與數(shù)理統(tǒng)計(jì)
- 認(rèn)識(shí)無(wú)窮的八堂課:數(shù)學(xué)世界的冒險(xiǎn)之旅
- 全局優(yōu)化理論幾種算法的改進(jìn)研究