From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Sat, 1 Jun 2019 08:44:39 +0000 (+0800) Subject: fix: fix api port (#108) X-Git-Tag: v1.0.5~208^2~81 X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=commitdiff_plain;h=59473f6c0eb271466cbf454b0605c9b1168725e5;ds=sidebyside fix: fix api port (#108) --- diff --git a/Dockerfile b/Dockerfile index 79d15287..9873f2b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ RUN apk add --no-cache ca-certificates COPY --from=builder /go/src/github.com/vapor/cmd/bytomd/bytomd /usr/local/bin/ COPY --from=builder /go/src/github.com/vapor/cmd/bytomcli/bytomcli /usr/local/bin/ -EXPOSE 1999 46656 46657 9888 +EXPOSE 1999 46656 46657 9889 diff --git a/README.md b/README.md index 98107b32..723b8438 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ For more details about using `bytomcli` command please refer to [API Reference]( Access the dashboard: ``` -$ open http://localhost:9888/ +$ open http://localhost:9889/ ``` ### In Docker diff --git a/config/toml.go b/config/toml.go index 2c8e47a3..81027087 100644 --- a/config/toml.go +++ b/config/toml.go @@ -23,7 +23,7 @@ var defaultConfigTmpl = `# This is a TOML config file. # For more information, see https://github.com/toml-lang/toml fast_sync = true db_backend = "leveldb" -api_addr = "0.0.0.0:9888" +api_addr = "0.0.0.0:9889" moniker = "" ` diff --git a/test/integration/bash_rpc/create-account.sh b/test/integration/bash_rpc/create-account.sh index 71595030..79310f8a 100755 --- a/test/integration/bash_rpc/create-account.sh +++ b/test/integration/bash_rpc/create-account.sh @@ -1 +1 @@ -curl -d '[{"root_xpubs":["2d6c07cb1ff7800b0793e300cd62b6ec5c0943d308799427615be451ef09c0304bee5dd492c6b13aaa854d303dc4f1dcb229f9578786e19c52d860803efa3b9a"],"Quorum":1,"Alias":"aa","Tags":{"test_tag":"v0"},"client_token":"test_token"}]' -X POST http://localhost:9888/create-account +curl -d '[{"root_xpubs":["2d6c07cb1ff7800b0793e300cd62b6ec5c0943d308799427615be451ef09c0304bee5dd492c6b13aaa854d303dc4f1dcb229f9578786e19c52d860803efa3b9a"],"Quorum":1,"Alias":"aa","Tags":{"test_tag":"v0"},"client_token":"test_token"}]' -X POST http://localhost:9889/create-account diff --git a/test/integration/bash_rpc/create-key.sh b/test/integration/bash_rpc/create-key.sh index 0d4a32b7..47a18031 100755 --- a/test/integration/bash_rpc/create-key.sh +++ b/test/integration/bash_rpc/create-key.sh @@ -1 +1 @@ -curl -d '{"Alias": "alice", "Password": "123456"}' -X POST http://localhost:9888/create-key +curl -d '{"Alias": "alice", "Password": "123456"}' -X POST http://localhost:9889/create-key diff --git a/test/integration/bash_rpc/net-info.sh b/test/integration/bash_rpc/net-info.sh index 2c5ad434..74c473c2 100755 --- a/test/integration/bash_rpc/net-info.sh +++ b/test/integration/bash_rpc/net-info.sh @@ -1 +1 @@ -curl -X POST http://localhost:9888/net-info -d '{}' +curl -X POST http://localhost:9889/net-info -d '{}' diff --git a/test/integration/run_test.go b/test/integration/run_test.go index 880cf6b7..f186ca22 100644 --- a/test/integration/run_test.go +++ b/test/integration/run_test.go @@ -13,7 +13,7 @@ func mockConfig() *cfg.Config { var config = cfg.DefaultConfig() config.Wallet.Disable = false config.Mining = true - config.ApiAddress = "127.0.0.1:9888" + config.ApiAddress = "127.0.0.1:9889" return config } diff --git a/util/util.go b/util/util.go index f26da962..f7e06fa1 100644 --- a/util/util.go +++ b/util/util.go @@ -24,7 +24,7 @@ const ( ) var ( - coreURL = env.String("BYTOM_URL", "http://127.0.0.1:9888") + coreURL = env.String("BYTOM_URL", "http://127.0.0.1:9889") ) // Wraper rpc's client