- Bityoga fabric sdk should be up and running (Hyperledger Explorer service should be running. This app relies on hyperledger explorer api to get transction details).
- Node version
- Supports node version >=v11.0.0
- Tested with v11.0.0
-
git clone https://github.com/bityoga/tic_event_listener.git
-
- cd tic_event_listener/
- Set node version :
nvm use node v11.0.0
(using nvm) - Execute Command :
npm install
-
cd tic_event_listener/
- Execute Command :
node app.js
- app will be running in 'localhost' at port 3004
- open in browser: http://localhost:3004/
fabric_as_code deployment
- This is deployed along with the cli service playbook103.deploy_cli.yml
- Deployment happens throuh CLI.sh
$ git clone https://github.com/bityoga/tic_event_listener.git
$ cd tic_event_listener
$ npm i # Run this to generate package-lock.json which will be required for creating docker image
Do step 3 as said above if running locally
$ docker build --tag tic-smart-api .
$ docker run -d --name tic-smart-api -p 3004:3004 tic-smart-api:latest
$ docker service create --name tic-smart-api-service --replicas 1 -p 3004:3004 tic-smart-api:latest