Giter VIP home page Giter VIP logo

smart_energy_app's Introduction

Smart Energy Node App

Requirements

  1. Bityoga fabric sdk should be up and running
  2. Node version
    • Supports node version >=v11.0.0
    • Tested with v11.0.0

Run Instructions

  1. Clone this repository

  2. Run npm install

    • cd smart_energy_app/
    • Set node version

      • nvm use node v11.Updated REAdm0.0 (using nvm)
    • Execute Command : npm install
  3. Update fabric ip address in 'smart_energy_app/fabric_node_sdk_helper/network_profile.json'

  4. Retrieve hyperledger fabric tls certificates of 'orderer' and 'peer2'

    Through shell script - needs ssh permission

    • cd smart_energy_app/fabric_node_sdk_helper
    • In 'smart_energy_app/fabric_node_sdk_helper/get_tls_certificates.sh' Replace IP_ADDRESS="178.62.207.235" with your fabric prime manager's ip address
    • Execute Command : bash get_tls_certificates.sh

    (OR) Through Manual scp commands - needs ssh permission

    • Replace ipaddress in the below scp commands with your fabric prime manager's ip address.
    • scp -r [email protected]:/root/hlft-store/orderer/tls-msp/tlscacerts/tls-tlsca-7054.pem .smart_energy_app/fabric_node_sdk_helper/hlft-store/orderer/tls-msp/tlscacerts/tls-tlsca-7054.pem
    • scp -r [email protected]:/root/hlft-store/peer2/tls-msp/tlscacerts/tls-tlsca-7054.pem .smart_energy_app/fabric_node_sdk_helper/hlft-store/peer2/tls-msp/tlscacerts/tls-tlsca-7054.pem

    (OR) Manually edit the following two files - no need of ssh permission

    • smart_energy_app/fabric_node_sdk_helper/hlft-store/orderer/tls-msp/tlscacerts/tls-tlsca-7054.pem
    • smart_energy_app/fabric_node_sdk_helper/hlft-store/peer2/tls-msp/tlscacerts/tls-tlsca-7054.pem
  5. Start App

    • cd smart_energy_app/
    • Execute Command : node app.js
    • app will be running in 'localhost' at port 3000
    • open in browser: http://localhost:3000/

smart_energy_app's People

Contributors

anandhakumarpalanisamy 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.