Environment: Hyperledger Fabric v1.2

Fabric uses 'npm install --production' to build chaincode docker image.

And run CC by using 'npm start -- --peer.address'

So, only following files are needed to be released

  • javascript files
  • package.json
  • package-lock.json

In case of NodeJs, javascript files should be deployed to peer nodes. So, usually uglifying and optimization is required.
And webpack is most popular tool for this requirements.
And in case that all source codes are bundled to one file - bundle.js - then, releasing only three files are enough!

  • bundle.js
  • package.json
  • package-lock.json

And 'npm start' may look like 'node bundle.js'.

블로그 이미지


댓글을 달아 주세요