From 75f49dc1fe1b139c29e07b74a58c4aa0d2e6129c Mon Sep 17 00:00:00 2001 From: sp Date: Thu, 25 Feb 2021 11:10:42 +1100 Subject: [PATCH] try a different host name --- config.go | 2 +- config.json | 2 +- main.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config.go b/config.go index e0ad442..27cddab 100644 --- a/config.go +++ b/config.go @@ -18,7 +18,7 @@ var configFile = "config.json" var config = configuration{} func (m *configuration) readConfig() (e error) { - log.Printf("read Path config from %s\r\n", configFile) + log.Printf("read Path config from %s", configFile) body, e := ioutil.ReadFile(configFile) if e != nil { log.Fatal("Cannot read config from " + configFile) diff --git a/config.json b/config.json index 4b866e6..1862424 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "Host":"127.0.0.1", + "Host":"localhost", "Port":"8080", "DocRoot": "./html/", "StaticUrl": "/", diff --git a/main.go b/main.go index fb4894d..8aaa338 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,7 @@ package main import ( "biukop.com/sfm/loan" "fmt" - "log" + log "github.com/sirupsen/logrus" "net/http" ) @@ -44,7 +44,7 @@ func setupHTTPHandler() { http.HandleFunc("/spa/livecast", HelloHandler) http.HandleFunc("/spa/editmeeting", HelloHandler) - fmt.Printf("Server started at port %s\n", config.Port) + log.Printf("Server started at %s:%s\n", config.Host, config.Port) log.Fatal(http.ListenAndServe(config.Host+":"+config.Port, nil)) }