Details

    • Type: Sub-task
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Done
    • Labels:
      None

      Description

      what files should be contained in the code package of the ChaincodeDeploymentSpec for a javascript chaincode?

      Two files are the main ones:

      • chaincode.js: does not have to be named exactly as such, because the chaincode container will use "npm start" to launch the container instance. this module gets called by the node.js engine and should start the shim by calling shim.start(). it will implement the init() and invoke() functions required by the chaincode API interface. It can require other source modules with require("./a/relative/path"), or external modules with require("the-external-module")
      • package.json: is critical in two aspects, one is to declare how to launch the chaincode program by providing a "scripts" section that has a "start" entry, which will be used by the chaincode container to start the chaincode program with "npm start". Another is to declare the runtime dependencies.

        Attachments

          Activity

            People

            • Assignee:
              jimthematrix Jim Zhang
              Reporter:
              jimthematrix Jim Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d

                  Git Integration