Procházet zdrojové kódy

try a different host name

master
sp před 4 roky
rodič
revize
75f49dc1fe
3 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. +1
    -1
      config.go
  2. +1
    -1
      config.json
  3. +2
    -2
      main.go

+ 1
- 1
config.go Zobrazit soubor

@@ -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)

+ 1
- 1
config.json Zobrazit soubor

@@ -1,5 +1,5 @@
{
"Host":"127.0.0.1",
"Host":"localhost",
"Port":"8080",
"DocRoot": "./html/",
"StaticUrl": "/",

+ 2
- 2
main.go Zobrazit soubor

@@ -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))

}

Načítá se…
Zrušit
Uložit