개발 환경 세팅
fabcar로 sample application
1. 블록체인 네트워크 구성
→ 명령어 실행 위치 : ~/fabric-samples/first-network
이전에 byfn 실습했으면
./byfn.sh down
docker rm -f $(docker ps -aq)
docker rmi -f $(docker images | grep fabcar | awk '{print $3}')
2. Launch network
→ 명령어 실행 위치 : ~/fabric-samples/fabcar
./startFabric.sh javascript
- spin up a blockchain network comprising peers, orderers, certificate authorities and more
- install and instantiate a JavaScript version of the FabCar smart contract
3. Install the application
npm install
4. Enrolling admin user
node enrollAdmin.js
5. Enrolling user1
node registerUser.js
6. 쿼리날리기
fabcar 실습