we can skip step 7 can import files one by one into playground
- clone composer:
git clone https://github.com/hyperledger/composer - bootstrap dependencies:
lerna bootstrap - init submodules of
composer-playgroundpackage:git submodule && git submodule update - start up
composer-playground-apipackage:node composer/packages/composer-playground-api/cli.js - build
composer-playground:env PLAYGROUND_API=http://localhost:15699 npm run build(we can change playground api address via process environment variable) - start up
composer-playground:node composer/packages/composer-playground/cli.js - package the examples:
composer archive create -a dist/{name}-network.bna --sourceType dir --sourceName . - import the
bnafile into playground
ensure that identity pub/priv keys used in composer profile credentials and fabric (orderer/peer/client)'s admincerts are identical
- use configtxgen to generate a channel genesis file:
configtxgen -profile {GenesisProfile} -outputCreateChannelTx composerchannel.tx -channelID composerchannel - create channel
composerchannelwith orderer - peer {composer-peer} join channel
composerchannel - deploy network archive:
composer network deploy -a {networkArchive.bna} -p {connectionProfile} -i {adminId} -s {adminSecret} -o endorsementPolicyFile={endorsementPolicy.json} - generate rest api:
composer-rest-server -p hlfv1 -i {adminId} -s {adminSecret} -N never -S false -w true -t false -n {businessNetwork} - generate angular2 app:
yo hyperledger-composer(install yoeman generator bynpm -g i generator-hyperledger-composer)