gin-backend-based-on-education

基于education的Fabric 2.2 and Gin纯后端

运行环境

Ubuntu 20.04

Go 1.17.1

docker 20.10.7

docker-compose 1.25.0

参考Fabric中文文档

(版本不同不代表无法运行)

运行方式

/etc/hosts中添加:

127.0.0.1  orderer.example.com
127.0.0.1  peer0.org1.example.com
127.0.0.1  peer1.org1.example.com

添加依赖:

cd education && go mod tidy

运行项目:

./clean_docker.sh

127.0.0.1:9000进行访问

注意

不要修改education文件夹文件名

不要修改fixturessdkInit下的任何东西

education为工作路径打开vscode

无视education\chaincode\edu.go的报错

链码:education\chaincode\edu.go

后端服务:education\service\eduService.go

Gin路由:education\main.go中的ginInit()函数