Hyperledger Explorer


0、前提条件

1、下载代码

2、初始化数据
    sudo -u postgres psql
    \i app/db/explorerpg.sql
    \i app/db/updatepg.sql
重点:
vim  /var/lib/pgsql/10/data/pg_hba.conf
将所有登录要求全部改成信任(strust),否则启动项目时,会报错:用户登录失败
# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     all                                     peer
#host    replication     all             127.0.0.1/32            ident
#host    replication     all             ::1/128                 ident
host    all             all             0.0.0.0/0               trust  

3、开始启动hyperledger-explorer
打开一个控制台:
cd blockchain-explorer
(修改config.json中对应的ip、配置文件路径、通道名称、数据库连接名称密码ip等)
再打开一个控制台:
cd blockchain-explorer/app/test
npm install
npm run test
cd blockchain-explorer
npm install
cd client/
npm install
npm test -- -u --coverage
npm run build
再打开一个控制台:
cd blockchain-explorer/
./start.sh (it will have the backend up).
tail -f log.log (view log)
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐