Git Product home page Git Product logo

voting-blockchain's Introduction

voting-app-network

A Hyperledger Fabric blockchain network to cast votes

Pre-requisites

If you're running on Ubuntu, you can download the prerequisites using the following commands:

curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh chmod u+x prereqs-ubuntu.sh

Next run the script - as this briefly uses sudo during its execution, you will be prompted for your password.

./prereqs-ubuntu.sh

Next install the following tools:

npm install -g composer-cli

npm install -g composer-rest-server

npm install -g composer-playground

npm install -g yo generator-hyperledger-composer

Run the following commands to install the local Hyperledger Fabric runtime:

mkdir ~/fabric-dev-servers

cd ~/fabric-dev-servers

curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.tar.gz

tar -xvf fabric-dev-servers.tar.gz

export FABRIC_VERSION=hlfv12

./downloadFabric.sh

./startFabric.sh

./createPeerAdminCard.sh

Testing Application

Follow the steps below to run the application:

  1. Go to Hyperledger Fabric Server Folder
    • Open a terminal in there and run the command:./startFabric.sh
  2. Go to voting-blockchain folder
    • Open a new terminal in there and run the command:composer network install --archiveFile [email protected] --card PeerAdmin@hlfv1
    • To deploy the network now run the command:composer network start --networkName voting-app-network --networkVersion 0.1.0 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file voting-app-admin.card
  3. To start the Rest Server open a new terminal in voting-blockchain folder
    • Run the command:composer-rest-server -c admin@voting-app-network -n never -u true -w true
  4. Go to the voting-angular-app and open a new terminal
    • Run the command:npm start

voting-blockchain's People

Contributors

savan777 avatar

Watchers

James Cloos avatar  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.