diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1,11 +1,21 @@ package main import ( + "fmt" "log" "net/http" + "os" ) +var config Config + func main() { + var err error + config, err = LoadFile("config.json") + if err != nil { + fmt.Fprintln(os.Stderr, "Error loading config") + os.Exit(1) + } router := NewRouter() log.Fatal(http.ListenAndServe(config.Server.Listen+":"+config.Server.Port, router)) } |