freckie

Update

...@@ -11,8 +11,9 @@ type Config struct { ...@@ -11,8 +11,9 @@ type Config struct {
11 } 11 }
12 12
13 type ConfigServer struct { 13 type ConfigServer struct {
14 - LocalMode bool `json:"local_mode"` 14 + LocalMode bool `json:"local_mode"`
15 - Port int `json:"port"` 15 + Host string `json:"host"`
16 + Port int `json:"port"`
16 } 17 }
17 18
18 type ConfigDatabase struct { 19 type ConfigDatabase struct {
......
...@@ -71,7 +71,7 @@ func main() { ...@@ -71,7 +71,7 @@ func main() {
71 if cfg.Server.LocalMode { 71 if cfg.Server.LocalMode {
72 handler := cors.AllowAll().Handler(router) 72 handler := cors.AllowAll().Handler(router)
73 hs := make(HostSwitch) 73 hs := make(HostSwitch)
74 - hs["icns.frec.kr:8080"] = handler 74 + hs[config.Server.Host+":"+config.Server.Port]
75 75
76 // Start Server in Local Mode 76 // Start Server in Local Mode
77 log.Println("[Local Mode] Starting HTTP API Server on port", portStr) 77 log.Println("[Local Mode] Starting HTTP API Server on port", portStr)
......