Created
February 6, 2019 08:01
-
-
Save SauravKanchan/c61ff9ad689f93241757f60d823f2ff0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setting Up hyperledger fabric dev servers | |
$ mkdir ~/fabric-tools && cd ~/fabric-tools | |
$ curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.zip | |
$ unzip fabric-dev-servers.zip | |
$ mkdir ~/fabric-tools && cd ~/fabric-tools | |
$ curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.tar.gz | |
$ tar xzf fabric-dev-servers.tar.gz | |
export FABRIC_VERSION=hlfv11 | |
$ cd ~/fabric-tools | |
# Downloading Hyperledger Fabric | |
$ ./downloadFabric.sh | |
# docker images | |
# Start Hyperledger Fabric | |
$ ./startFabric.sh | |
# docker ps | |
$ ./createPeerAdminCard.sh | |
$ cd ~/.composer/cards/ | |
# cd ~/.composer/cards/PeerAdmin@hlfv1/credentials | |
vim certificate | |
vim privateKey | |
$ npm install # project related packeges | |
$ npm install -g composer-cli@0.19 # To create .bna file | |
$ npm install -g composer-rest-server@0.19 # To create rest server | |
$ npm install -g composer-playground@0.19 # To start composer-playground | |
# Create .bna file to deploy | |
$ composer archive create -a perishable-network-rait | |
$ composer archive create --sourceType dir --sourceName . -a perishable-network-rait.bna | |
$ composer-playground # Runining on loclahost:8080 | |
# Deploy a new business network | |
# Import .bna file | |
# Deploy | |
$ composer-rest-server | |
? Enter the name of the business network card to use: admin@perishable-network-rait | |
? Specify if you want namespaces in the generated REST API: never use namespaces | |
? Specify if you want to use an API key to secure the REST API: No | |
? Specify if you want to enable authentication for the REST API using Passport: No | |
? Specify if you want to enable the explorer test interface: Yes | |
? Specify a key if you want to enable dynamic logging: | |
? Specify if you want to enable event publication over WebSockets: Yes | |
? Specify if you want to enable TLS security for the REST API: No | |
# Server running on localhost:3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment