fixed logs and config locations, updated connection closure handling

This commit is contained in:
2025-12-10 11:22:09 +01:00
parent 709abb30fa
commit 27609dba2b
7 changed files with 75 additions and 24 deletions

13
main.go
View File

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