fixed logs and config locations, updated connection closure handling
This commit is contained in:
13
main.go
13
main.go
@@ -3,11 +3,20 @@ package main
|
||||
import (
|
||||
"flag"
|
||||
"homestead/homestead_gateway/controller"
|
||||
"homestead/homestead_gateway/util"
|
||||
"homestead/homestead_gateway/util/config"
|
||||
"os"
|
||||
"path"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cfgPath := flag.String("config", "config.toml", "configuration file")
|
||||
dir := util.GetPath()
|
||||
if dir == "" {
|
||||
dir, _ = os.Getwd()
|
||||
}
|
||||
|
||||
file := path.Join(dir, "config.toml")
|
||||
cfgPath := flag.String("config", file, "configuration file")
|
||||
cfg, err := config.LoadConfig(*cfgPath)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -19,3 +28,5 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// todo logs from exe not cwd
|
||||
|
||||
Reference in New Issue
Block a user