Giter Site home page Giter Site logo

priveos-demo-app's Introduction

privEOS_Demo_App

Demonstrating a frontend connected to the priveos smart contract and node services to upload, list and download files based on transactions.

Environments

You can switch between localhost and jungle2 (default). To connect to localhost, append url param: ?env=localhost or set localStorage item:

localStorage.setItem('env', 'localhost')

To be able connecting to localhost, you need to have the following processes running:

  1. EOS node with privEOS smart contract
  2. IPFS node
  3. MongoDB (only if mongodb plugin is used by EOS)

Prerequisites

Ensure you have the following global bash utilities installed:

  1. jq (for deployment to ipfs only, see bin folder)
  2. webpack
  3. yarn or npm

The webpack production build does not work with node version > 8.9.0!

Priveos Client Library

The frontend requires the priveos client library. To link it, run:

# in priveos-client folder:
npm link

# in privEOS_Demo_App/frontend folder:
npm link priveos

Production Build

To create an optimized production build, run:

cd frontend
yarn build

Local Development

To start the local development frontend, run:

cd frontend
yarn start

It will then start a local development server with live reload. The default configuration does connect to jungle2 testnet, so no full node required but you apparently you need to have ipfs running to up- and download files:

ipfs daemon

If you do not have ipfs installed, see this section:

Install IPFS

brew install ipfs
ipfs init
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
brew services start ipfs

Deploy to IPFS

Start an ipfs daemon. Then run:

bin/deploy-to-ipfs

priveos-demo-app's People

Contributors

fabifrank avatar angelol avatar

Watchers

 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.