Search⌘ K

Deploy Client Application

Explore how to build a client application for a Hyperledger Fabric blockchain network. Learn to enroll an admin user, query ledgers, invoke chaincode functions, and manage identities with wallets. This lesson provides hands-on experience with API endpoints, server setup, and deploying secure blockchain transactions.

Folder Structure for API #


Now lets look at important files inside the api folder.

  1. src/index.js:
    Creates an express.js server that exposes following endpoints.

    • EnrollAdmin
      • This will enroll the admin with CA using SDK and then store Admin’s credentials in a file-based wallet.
    • Query
      • This will query the blockchain using the landrec chaincode. It will use fabric node sdk to do so.
    • Invoke
      • This will invoke the createLand method in our landrec chaincode
  2. src/controllers/*.js:
    Implementation of all above endpoints in their respective ...