From 43d95bbe23a828ab29ff31496562f10d9def0341 Mon Sep 17 00:00:00 2001 From: patrick Date: Tue, 17 Mar 2020 20:42:08 +1100 Subject: [PATCH] add configurable port --- config.go | 4 ++++ config.json | 4 ++++ config.test.json | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/config.go b/config.go index 74937e1..b3e842c 100644 --- a/config.go +++ b/config.go @@ -26,6 +26,10 @@ type AppConfig struct { Pass string `json:Pass` Schema string `json:Schema` } `json:DB` + Server struct { + Host string `json:Host` + Port string `json:Port` + } `json:Server` } var Config AppConfig diff --git a/config.json b/config.json index b60e52a..b57b462 100644 --- a/config.json +++ b/config.json @@ -16,5 +16,9 @@ "User": "sp", "Pass": "sp", "Schema": "leanwork_pay" + }, + "Server": { + "Host":"localhost", + "Port":"8080" } } \ No newline at end of file diff --git a/config.test.json b/config.test.json index 400ed25..13476d8 100644 --- a/config.test.json +++ b/config.test.json @@ -16,5 +16,9 @@ "User": "sp", "Pass": "sp", "Schema": "leanwork_pay" - } + }, + "Server": { + "Host":"localhost", + "Port":"8080" + } } \ No newline at end of file