GithubHelp home page GithubHelp logo

pcxchg's Introduction

HLF


This project was developed
with Hyperledger Fabric version 1.0.2.
and node.js as client app.

Write, compile & deploy and call chaincode for HLF.

How to use

Than, there are 2 small parts to successfully running this project.

Preparation

  1. git clone https://github.com/vitalrev/pcxchg.git
  2. In first terminal cd producerApp
  3. npm install
  4. cp certs/fec45fb2ed11bccb2e990c2ea180a7e8714a5cdb9f3be257629fa64b9241a8a6_sk ~/.hfc-key-store/fec45fb2ed11bccb2e990c2ea180a7e8714a5cdb9f3be257629fa64b9241a8a6-priv
  5. In second terminal cd marketApp
  6. npm install
  7. cp certs/892511a30be217ddc2ff439f650caad802b399ce43b903835d321ed3728fe246_sk ~/.hfc-key-store/892511a30be217ddc2ff439f650caad802b399ce43b903835d321ed3728fe246-priv

Start and initialize HLF Network

  1. In third terminal docker-compose -f docker-compose-pcxchg.yaml up
  2. In fourth terminal ./networkOld.sh

Start Client Apps

  1. In first terminal (under producerApp) node producerApp.js
    Test with GUI http://localhost:4000/ or Curl (invoke createPC):
    curl -s -X POST http://localhost:4000/invoke -H "content-type: application/json" -d '{"args":["Asus","Asus001","foo","bar"]}'
    See results with
    ./query.sh
  2. In second terminal (under marketApp) node marketApp.js
    Test with browser:
    http://localhost:5000/API/queryStock?producer=Asus
    http://localhost:5000/API/queryDetails?producer=Asus&serial=Asus001
    Buy PC with GUI:
    http://localhost:5000/buyPC

Test queries

./query.sh

pcxchg's People

Contributors

vitalrev avatar

Stargazers

Michiel Mulders avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.