Starting the chaincode development
Before we can start coding our chaincode, we need to first start up our development environment.
The steps of setting up the development environment has been explained in Chapter 3, Setting the Stage with a Business Scenario. However, we now proceed with starting up the Fabric network in dev-mode. This mode allows us to control how we built and run the chaincode. We will use this network to run our chaincode in the development environment.
Here is how we start the Fabric network in dev mode:
$ cd $GOPATH/src/trade-finance-logistics/network $ ./trade.sh up -d true
Note
If you encounter any error while the network start, it could be caused by some left-over Docker container.Â
You can resolve this by stopping the network using ./trade.sh down -d true
and running the following command: ./trade.sh clean -d true
.
The -d
true option tells our script to take action on the dev network.
Our development network is now running in five Docker containers. The network is...