freckie

Update

...@@ -12,6 +12,7 @@ type Config struct { ...@@ -12,6 +12,7 @@ type Config struct {
12 12
13 type ConfigServer struct { 13 type ConfigServer struct {
14 LocalMode bool `json:"local_mode"` 14 LocalMode bool `json:"local_mode"`
15 + Host string `json:"host"`
15 Port int `json:"port"` 16 Port int `json:"port"`
16 } 17 }
17 18
......
...@@ -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)
......