add environment variable DISCOVERY_AS_LOCALHOST

Signed-off-by: Acmefocus <107723772@qq.com>
This commit is contained in:
Acmefocus 2020-07-10 10:32:49 +08:00
parent 2933d88be4
commit 5b30577af3
2 changed files with 1 additions and 4 deletions

View file

@ -18,6 +18,7 @@ import (
)
func main() {
os.Setenv("DISCOVERY_AS_LOCALHOST", "true")
wallet, err := gateway.NewFileSystemWallet("wallet")
if err != nil {
fmt.Printf("Failed to create wallet: %s\n", err)

View file

@ -109,12 +109,8 @@ Go:
Start by changing into the "go" directory:
cd go
Set environment variable DISCOVERY_AS_LOCALHOST to true, to indicate to ServiceDiscovery that all hostnames maps to localhost
Then, install dependencies and run the test using:
go run fabcar.go
or
./runfabcar.sh
The test will invoke the sample client app which perform the following:
- Import user credentials into the wallet (if they don't already exist there)