1. 进入目录
/opt/gopath/src/github.com/hyperledger/blockchain-explorer
创建psg.yaml
# Use postgres/example user/password credentials
version: '3.1'
services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
volumes:
- ./psgdata:/var/lib/postgresql/data
adminer:
image: adminer
restart: always
ports:
- 8081:8080
启动db
docker-compose -f psg.yaml up
启动后,localhost:8081未adminer管理界面,5432为db端口
登陆postgres/postgres,创建数据库和表,使用脚本为
app/persistance/postgreSQL/db/*.sql
确保文件/opt/gopath/src/github.com/hyperledger/blockchain-explorer/app/persistance/postgreSQL/db/pgconfig.json中配置和真实环境匹配。
2. 在所有带有package.json的目录执行npm install
启动 fabric-samples中的first-network
启动app使用
cd app
node main.js
启动client
cd client
npm run start
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有