Hyperledger Supply Chain
  • Hyperledger Supply-Chain
  • Hyperledger Overview
  • Business Case
  • Implementation
    • System Architecture
    • Governance
    • API Reference
    • Deploy/run dApp
    • User Interface
    • Development Tools
  • Contact
  • Appendix
  • MIT License
Powered by GitBook
On this page
  • Step 1. Start Hyperledger network and deploy the chaincode
  • Step 2. Generate user certificates
  • Step 3. Run API
  • How to stop network

Was this helpful?

  1. Implementation

Deploy/run dApp

This section describes how to deploy and run the Hyperledger Food Supply Chain dApp.

Step 1. Start Hyperledger network and deploy the chaincode

Switch to project folder

$ cd hyperledger-supply-chain

Switch to the network folder

cd network/fabric-network

Start network

./network.sh up createChannel -ca -s couchdb

Deploy the chaincode

./network.sh deployCC -ccn supplychain -ccp ../../chaincode -ccl typescript

Step 2. Generate user certificates

Switch to the following folder:

cd hyperledger-supply-chain/web-app/server/fabric

Remove previously generated certificates

rm -R wallet/*

Run the following commands in sequence to generate identity certificates for admin and manager/employee users.

node enrollAdmin.js
node registerUsers.js

Step 3. Run API

Switch to the web API folder

cd hyperledger-supply-chain/web-app/server

Start the server

node app

How to stop network

Run the following script from the network folder mentioned above

./network down
PreviousAPI ReferenceNextUser Interface

Last updated 3 years ago

Was this helpful?