使用 hyperledger composer 启动 REST 服务器时出现问题
Problem in starting REST server using hyperledger composer
我已经设置了 hyperledger fabric 并且在我开始时也启动了 network.But
创建 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)
启动服务器后,它会问你一些问题,其中之一是
Specify if you want to enable the explorer test interface
确保你把 yes
放在里面
我已经设置了 hyperledger fabric 并且在我开始时也启动了 network.But 创建 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)
启动服务器后,它会问你一些问题,其中之一是
Specify if you want to enable the explorer test interface
确保你把 yes
放在里面