This commit is contained in:
1 parent
40dc935eea
commit
a13331e5a5
1 file changed
+3
-3
+3
-3
@@ -18,8 +18,8 @@ import (
|
|||||||
func Run() {
|
func Run() {
|
||||||
configPath := flag.String("config", "config.json", "path to config.json file")
|
configPath := flag.String("config", "config.json", "path to config.json file")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
common.Global = common.GetConfig(*configPath)
|
common.Global = common.GetConfig(*configPath)
|
||||||
|
log.Printf("[INFO] Read in config from %s\n", *configPath)
|
||||||
|
|
||||||
// setup http router
|
// setup http router
|
||||||
router := http.NewServeMux()
|
router := http.NewServeMux()
|
||||||
@@ -47,8 +47,8 @@ func Run() {
|
|||||||
|
|
||||||
server := LoggingMiddleware(router)
|
server := LoggingMiddleware(router)
|
||||||
|
|
||||||
// run on all interfaces with port
|
log.Printf("[INFO] starting server listening on 0.0.0.0:%d", common.Global.Port)
|
||||||
log.Fatal("[ERR ] starting gin router: ", http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", common.Global.Port), server))
|
log.Fatalf("[ERR ] starting gin router: %s", http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", common.Global.Port), server))
|
||||||
}
|
}
|
||||||
|
|
||||||
// setup static resources under web (css, images, modules, scripts)
|
// setup static resources under web (css, images, modules, scripts)
|
||||||
|
|||||||
Reference in new issue
Block a user