Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Latest commit

 

History

History
77 lines (51 loc) · 1.62 KB

README.md

File metadata and controls

77 lines (51 loc) · 1.62 KB

Supply-Chain-POC : Multichain

Pharmaceutical Drugs-Supply-Chain POC built on MultiChain

Using this project

  1. Install NodeJS
$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
$ sudo apt-get install -y nodejs
  1. Install Ionic
$ npm install -g ionic
  1. Install Multichain
$ wget https://www.multichain.com/download/multichain-1.0.1.tar.gz
$ tar -xvzf multichain-1.0.1.tar.gz
$ cd multichain-1.0.1
$ mv multichaind multichain-cli multichain-util /usr/local/bin
  1. Run 4 separate nodes

Create 4 folders named FDANode, PharmNode, DistNode, ManfNode Then,

cd /

multichaind blockchain -datadir=/root/MultiChainDir/FDANode -port=6451 -rpcport=6450 -daemon
multichaind blockchain -datadir=/root/MultiChainDir/PharmNode/ -port=7000 -rpcport=6999 -daemon
multichaind blockchain -datadir=/root/MultiChainDir/DistNode/ -port=8000 -rpcport=7999 -daemon
multichaind blockchain -datadir=/root/MultiChainDir/ManfNode/ -port=9000 -rpcport=8999 -daemon

Create 4 streams: pubkeys, data, access, recall Using each account, post respective public key to the pubkeys stream.

In the folder 'SupplyChainServer' run:

$ npm install

Install all required plugins, in 'Frontend' folder, run

$ ionic state reset (First time only)

Run the project

To start backend server (to use Multichain API), in the folder 'SupplyChainServer' run:

$ node server.js 

To start frontend server, in 'Frontend' folder, run

$ ionic serve

Contributors