View Code? Open in Web Editor
NEW
node app for smart energy
JavaScript 31.57%
CSS 3.24%
HTML 64.85%
Shell 0.33%
smart_energy_app's Introduction
- Bityoga fabric sdk should be up and running
- Node version
- Supports node version >=v11.0.0
- Tested with v11.0.0
-
-
- cd smart_energy_app/
-
- nvm use node v11.Updated REAdm0.0 (using nvm)
- Execute Command : npm install
-
Update fabric ip address in 'smart_energy_app/fabric_node_sdk_helper/network_profile.json'
-
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
-
- 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
Watchers