This project is developed and tested on Linux 18.04 AWS t2.medium 40GB machine.
curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh
./prereqs-ubuntu.sh
npm install -g [email protected]
npm install -g [email protected]
npm install -g [email protected]
mkdir ~/fabric-dev-servers && cd ~/fabric-dev-servers
curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.tar.gz
tar -xvf fabric-dev-servers.tar.gz
cd ~/fabric-dev-servers
export FABRIC_VERSION=hlfv12
./downloadFabric.sh
cd ~/fabric-dev-servers
export FABRIC_VERSION=hlfv12
./stopFabric.sh
./teardownFabric.sh
./downloadFabric.sh
./startFabric.sh
./createPeerAdminCard.sh
All the screenshots of the below steps are attached in the bottom of this section.
Please refer them if you find any problem.
composer-playground
Open the composer playground in the browser.
Composer playground is started locally on the vm.
To access the playground on your web browser, instead of http://localhost:8080
Use ipaddress_of_vm:8080
.
Deploy the logistics-network.bna
in My Business Network not in the Web Browser.
Scroll down and select ID and Secret.
Username: admin
Password: adminpw
Now click Deploy
Open a new terminal
composer-rest-server
enter the admin card: admin@logistics-network
> ❕ Note: if you didn't note down it, open composer playground dashboard. The heading admin@something
is the admin card name
enter "No" to everything except test explorer.
Open config.json
in the src
folder 📂.
Change the serverURL
to the server address where composer-rest-server is running.
Change the timeRaster
min interval. By default it is set to 10 (mins).
Run npm install
inside the client folder.
Run npm run start
Open the application on localhost:3000
.
It is assumed that you started the fabric successfully.