'How to implement Hyperledger Fabric using Nodejs
We have created AWS managed blockchain network (Hyperledger Fabric). And I wanted to connect and create a simple transaction over this network. Lets say university user updated student marks in the system. I am totally new to blockchain and Hyperledger Fabric. So I wanted to know what basic steps do I need to achieve this scenario. I am using windows 8 and node JavaScript.
Since we there are few libraries given like fabric-shim and fabric-network but still I am not able to implement this. I need at least way to make connection establishment to AWS managed block chain network and upload simple transaction. Anybody having solution much appreciated. Thanks
Solution 1:[1]
I highly recommend you go through the official documentation it has matured very well over time and is very detailed. Go through the key concepts and then getting started.
https://hyperledger-fabric.readthedocs.io/en/release-2.2/whatis.html
Solution 2:[2]
I am able to connect to the network using below code:
const AWS = require('aws-sdk')
var managedblockchain = new AWS.ManagedBlockchain({'region': 'us-east- 1'});
var params = { NetworkId: 'Your-network-id-here' };
managedblockchain.getNetwork(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
More here https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ManagedBlockchain.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | hassan ahmed |
| Solution 2 | Elf |
