使用hyperledger composer启动REST服务器时出现问题

问题描述 投票:0回答:1

我已经设置了hyperledger结构并且还启动了网络。但是当我创建composer-rest-server并在我的浏览器上访问它并访问https://localhost:3000/explorer时,我收到一个错误:

    Unhandled error for request GET /explorer: Error: Cannot GET /explorer
    at raiseUrlNotFoundError (/usr/local/lib/node_modules/composer-rest- 
   server/node_modules/loopback/server/middleware/url-not-found.js:21:17)
    at Layer.handle [as handle_request] 
    (/usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/index.js:317:13)
    at /usr/local/lib/node_modules/composer-rest- 
     server/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/index.js:335:12)
    at next (/usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/index.js:275:10)
    at /usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/index.js:635:15
    at next (/usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/index.js:260:14)
    at Function.handle (/usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/index.js:174:3)
    at router (/usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/index.js:47:12)
    at Layer.handle [as handle_request] 
    (/usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/index.js:317:13)
    at /usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/index.js:335:12)
    at next (/usr/local/lib/node_modules/composer-rest- 
    server/node_modules/express/lib/router/index.js:275:10)
    at urlencodedParser (/usr/local/lib/node_modules/composer-rest- 
    server/node_modules/body-parser/lib/types/urlencoded.js:91:7)
hyperledger-fabric hyperledger-composer
1个回答
2
投票

启动服务器后,它会问你一些问题,其中一个是 Specify if you want to enable the explorer test interface 确保你把yes放进去

© www.soinside.com 2019 - 2024. All rights reserved.