我已经设置了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)
启动服务器后,它会问你一些问题,其中一个是
Specify if you want to enable the explorer test interface
确保你把yes
放进去