From f34f5ab0209db0485e44992ede88b2f23820828b Mon Sep 17 00:00:00 2001 From: naiba Date: Sat, 24 Oct 2020 21:44:03 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20custom=20http=20port?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + cmd/dashboard/main.go | 2 +- model/config.go | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f2efee..a158cab 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ C/S 采用 gRPC 通信,客户端通过添加主机生成的单独 Token 上报 ```yaml debug: true +httpport: 80 github: admin: - 用户 ID,看自己 GitHub 头像链接后面那一串数字 diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go index 0a504e3..9da77fe 100644 --- a/cmd/dashboard/main.go +++ b/cmd/dashboard/main.go @@ -45,7 +45,7 @@ func initDB() { } func main() { - go controller.ServeWeb(80) + go controller.ServeWeb(dao.Conf.HTTPPort) go rpc.ServeRPC(5555) select {} } diff --git a/model/config.go b/model/config.go index 23ba5c4..d1d578c 100644 --- a/model/config.go +++ b/model/config.go @@ -19,6 +19,7 @@ type Config struct { ClientID string ClientSecret string } + HTTPPort uint v *viper.Viper }