Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 1.38 KB

README.md

File metadata and controls

47 lines (29 loc) · 1.38 KB

NodeSdkSample

Sample programs to demonstrate basic NodeSdk Apis

Fabric 0.5 based Hello world program

###V0.5/hello-blockchain_V0_5.js A sample program to demonstrate apis Enroll, enroll and register new user, Deploy , Invoke and Query (chaincode_example02)

  • Install hfc with npm install command

    npm install [email protected]
    

    Current latest version is [email protected]

  • Excute the program using the below command

    node hello-blockchain_V0_5.js
    

Fabric 0.6 based Sample programs

###1. V0.6/hello-blockchain_V0_6.js A sample program to demonstrate apis Enroll, enroll and register new user, Deploy , Invoke and Query (chaincode_example02)

Follow the instructions mentioned here

###2. tlsca/tlsca_sample.js

A sample program with tlsca enabled on non-bluemix/Local network

Follow the instructions mentioned here

###3. events/event-sample.js

A sample program to demonstrate Custome events

Follow the instructions mentioned here

##NOTE:

  • As a pre-requisite you must install NodeJS
  • You must have a Fabric Network Setup to start using the hfc apis

##Troubleshoot:

  • Change port numbers if you face issues while deploying chaincode