Skip to content

Instantly share code, notes, and snippets.

@definev
Created December 8, 2022 06:51
Show Gist options
  • Save definev/67a097d276287f2c8e35d8b177f4e990 to your computer and use it in GitHub Desktop.
Save definev/67a097d276287f2c8e35d8b177f4e990 to your computer and use it in GitHub Desktop.

Customer loyalty hyperledger

A blockchain system that stores loyalty points transparently

Installation

Chạy make install để cài docker image và binary cần thiết cần thiết

Sử dụng wallet app

Cài đặt flutter nếu muốn chạy app wallet

Pre-run

Export binary to PATH

export PATH=$PATH:$PWD/bin

Run the network

Vào thư mục test-network để thực hiện tất cả các dòng lệnh phía dưới

make run_network

Đã xong phần build chaincode và mở các cổng để kết nối ra ngoài

Run the gateway

Vào thư mục go-gateway để thực hiện tất cả các dòng lệnh phía dưới

cd go-gateway

Chạy gateway server

go get
go run customer_loyalty.go

Expose localhost lên mạng bằng ngrok

ngrok http 8181

Run the client

Vào thư mục web-app để thực hiện tất cả các dòng lệnh phía dưới

cd web-app

Chạy client

npm install
npm run start

Run the wallet

Vào thư mục wallet chạy lệnh

flutter run

Tạo người dùng và partner bằng web-admin bên trên, đăng nhập sử dụng trên wallet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment