-
Notifications
You must be signed in to change notification settings - Fork 28
/
start-dev.sh
executable file
·28 lines (21 loc) · 1.02 KB
/
start-dev.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
export PORT=${PORT:-4000}
export PATH=./bin:$PATH
export ORG=${ORG:-org1}
export DOMAIN=${DOMAIN:-example.com}
export CRYPTO_CONFIG_DIR=${CRYPTO_CONFIG_DIR:-../fabric-starter/crypto-config}
[ ! -d "$CRYPTO_CONFIG_DIR" ] && echo "CRYPTO_CONFIG_DIR not found" && exit 1
export MSP_DIR=${CRYPTO_CONFIG_DIR}/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/msp
export CORE_PEER_LOCALMSPID=${ORG:-org1}
export CORE_PEER_MSPCONFIGPATH=${CRYPTO_CONFIG_DIR}/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/users/Admin@${ORG:-org1}.${DOMAIN:-example.com}/msp
export CORE_PEER_ADDRESS=${PEER_NAME:-peer0}.${ORG:-org1}.${DOMAIN:-example.com}:7051
export DISCOVER_AS_LOCALHOST=true
rm -rf hfc-*
echo -e "\n\n\n"
echo "Using PORT: $PORT"
echo "ORG: $ORG"
echo "DOMAIN: $DOMAIN"
echo "DISCOVER_AS_LOCALHOST: $DISCOVER_AS_LOCALHOST"
echo "Web ADMIN app folder: ${WEBADMIN_DIR:?Set WEBADMIN_DIR envvar to the admin application folder: export WEBADMIN_DIR=../fabric-starter-admin-web}"
echo -e "\n\n\n"
npx nodemon app.js