From 324e03b56a1c3a9823b2c07625c2d9c49956122b Mon Sep 17 00:00:00 2001 From: Annmol Date: Sun, 6 Mar 2022 21:01:12 -0600 Subject: [PATCH] Udpdated Admin/User --- .gitignore | 1 + supply-chain-client/enrollAdmin.js | 2 +- supply-chain-client/enrollUser.js | 2 +- supply-chain-client/package.json | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 53ee01b9..bb399445 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ vendor/ .idea # Dependency directories node_modules/ +wallet/ # Ignore Gradle build output directory build package-lock.json diff --git a/supply-chain-client/enrollAdmin.js b/supply-chain-client/enrollAdmin.js index 5f24d9e0..1c97ef31 100644 --- a/supply-chain-client/enrollAdmin.js +++ b/supply-chain-client/enrollAdmin.js @@ -37,7 +37,7 @@ Fabric_Client.newDefaultKeyValueStore({ path: store_path verify: false }; // be sure to change the http to https when the CA is running TLS enabled - fabric_ca_client = new Fabric_CA_Client('http://localhost:7054', tlsOptions , 'ca.example.com', crypto_suite); + fabric_ca_client = new Fabric_CA_Client('https://localhost:7054', tlsOptions , 'ca.example.com', crypto_suite); // first check to see if the admin is already enrolled return fabric_client.getUserContext('admin', true); diff --git a/supply-chain-client/enrollUser.js b/supply-chain-client/enrollUser.js index 7d318610..9fe2980d 100644 --- a/supply-chain-client/enrollUser.js +++ b/supply-chain-client/enrollUser.js @@ -41,7 +41,7 @@ Fabric_Client.newDefaultKeyValueStore({ path: store_path verify: false }; // be sure to change the http to https when the CA is running TLS enabled - fabric_ca_client = new Fabric_CA_Client('http://localhost:7054', null , '', crypto_suite); + fabric_ca_client = new Fabric_CA_Client('https://localhost:7054', null , '', crypto_suite); // first check to see if the admin is already enrolled return fabric_client.getUserContext('admin', true); diff --git a/supply-chain-client/package.json b/supply-chain-client/package.json index a4108c4c..5d5fa0b4 100644 --- a/supply-chain-client/package.json +++ b/supply-chain-client/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "Hyperledger Fabric POC", "scripts": { - "start": "nodemon -L server.js" + "start": "node server.js" }, "dependencies": { "angular": "^1.7.8", @@ -12,6 +12,7 @@ "express": "latest", "fabric-ca-client": "^2.2.4", "fabric-network": "^2.2.4" + }, "devDependencies": { "nodemon": "^2.0.15"