gpt4 book ai didi

hyperledger-composer - 在不同的端口上运行 composer-rest-server?

转载 作者:行者123 更新时间:2023-12-01 14:41:47 26 4
gpt4 key购买 nike

默认情况下,它从 3000 开始,它正在被另一个进程使用。

有没有办法让它在不同的端口上运行?

~/git/my-test-network$ composer-rest-server -p hlfv1 -n my-test-network -i admin -s adminpw -N never
Discovering types from business network definition ...
Discovered types from business network definition
Generating schemas for all types in business network definition ...
Generated schemas for all types in business network definition
Adding schemas for all types to Loopback ...
Added schemas for all types to Loopback
events.js:160
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE 0.0.0.0:3000
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at Server._listen2 (net.js:1258:14)
at listen (net.js:1294:10)
at net.js:1404:9
at _combinedTickCallback (internal/process/next_tick.js:83:11)
at process._tickCallback (internal/process/next_tick.js:104:9)

最佳答案

使用 -P 标志。

daniels-mbp-2:composer-common dselman$ composer-rest-server --help
Usage: composer-rest-server [options]

Options:
-p, --connectionProfileName The connection profile name [string]
-n, --businessNetworkName The business network identifier [string]
-i, --enrollId The enrollment ID of the user [string]
-s, --enrollSecret The enrollment secret of the user [string]
-N, --namespaces Use namespaces if conflicting types exist [string] [choices: "always", "required", "never"] [default: "always"]
-P, --port The port to serve the REST API on [number]
-S, --security Enable security for the REST API [boolean] [default: false]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]

关于hyperledger-composer - 在不同的端口上运行 composer-rest-server?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45282513/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com