mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
The removed samples make use of deprecated legacy client SDKs. They all have equivalent samples implemented using the currently supported Fabric Gateway client API, and are therefore redundant. Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
36 lines
956 B
Bash
Executable file
36 lines
956 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
CHAINCODE_LANGUAGE=${CHAINCODE_LANGUAGE:-go}
|
|
CHAINCODE_NAME=${CHAINCODE_NAME:-private}
|
|
CHAINCODE_PATH=${CHAINCODE_PATH:-../asset-transfer-private-data}
|
|
|
|
function print() {
|
|
GREEN='\033[0;32m'
|
|
NC='\033[0m'
|
|
echo
|
|
echo -e "${GREEN}${1}${NC}"
|
|
}
|
|
|
|
function createNetwork() {
|
|
print "Creating network"
|
|
./network.sh up createChannel -ca -s couchdb
|
|
print "Deploying ${CHAINCODE_NAME} chaincode"
|
|
./network.sh deployCC -ccn "${CHAINCODE_NAME}" -ccp "${CHAINCODE_PATH}/chaincode-${CHAINCODE_LANGUAGE}" -ccv 1 -ccs 1 -ccl "${CHAINCODE_LANGUAGE}" -cccg ../asset-transfer-private-data/chaincode-go/collections_config.json
|
|
}
|
|
|
|
function stopNetwork() {
|
|
print "Stopping network"
|
|
./network.sh down
|
|
}
|
|
|
|
# Run typescript gateway application
|
|
createNetwork
|
|
print "Initializing typescript application"
|
|
pushd ../asset-transfer-private-data/application-gateway-typescript
|
|
npm install
|
|
print "Start application"
|
|
npm start
|
|
popd
|
|
stopNetwork
|