File tree Expand file tree Collapse file tree 5 files changed +524
-0
lines changed
Expand file tree Collapse file tree 5 files changed +524
-0
lines changed Original file line number Diff line number Diff line change 1+ CHANNEL_NAME = my-channel1
2+ CONTRACT_NAME = chaincode1
3+ PEER_GATEWAY_URL = localhost:7041
4+ PEER_ORG_NAME = peer0.org1.example.com
5+ MSP_ID = Org1MSP
6+ TLS_ROOT_CERT = ../../../fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
7+ CREDENTIALS = ../../../fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem
8+ PRIVATE_KEY_PEM = ../../../fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/priv-key.pem
9+
Original file line number Diff line number Diff line change 1+ # Purpose
2+ To provide an example connection of Fablo with Node.js.
3+
4+ # Pre-requisites
5+ Docker
6+
7+ Node >22
8+
9+ Git
10+
11+ # Instructions
12+ 1 . (If Fablo is not already installed) Clone the Fablo repo with ` https://github.com/hyperledger-labs/fablo.git ` and then ` cd fablo ` .
13+ 2 . Start Docker.
14+ 3 . Run ` fablo up samples/fablo-config-hlf3-1orgs-1chaincode.json ` .
15+ 4 . Once Fablo is running, run ` cd samples/gateway/node ` .
16+ 5 . Now install the Node server's dependencies with ` npm i ` .
17+ 6 . Now let's copy the environment example to a usable file ` cp .env.example .env ` .
18+ 7 . Start the node server with ` node --env-file=.env server.js ` .
19+
20+ You should see a response like this:
21+ ```
22+ Put result: {"success":"OK"}
23+ Get result: {"success":"2025-04-29T16:13:42.097Z"}`
24+ ```
25+
You can’t perform that action at this time.
0 commit comments