diff --git a/.gitignore b/.gitignore index 343b19865..3a6f322af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -cmd/soft/soft -cmd/soft/.ssh -cmd/soft/.repos +soft +.ssh +.repos diff --git a/cmd/soft/main.go b/cmd/soft/main.go deleted file mode 100644 index d56324950..000000000 --- a/cmd/soft/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "log" - - "github.com/charmbracelet/soft" -) - -func main() { - cfg := soft.DefaultConfig() - s := soft.NewServer(cfg) - log.Printf("Starting SSH server on %s:%d\n", cfg.Host, cfg.Port) - err := s.ListenAndServe() - if err != nil { - log.Fatalln(err) - } -} diff --git a/main.go b/main.go new file mode 100644 index 000000000..f6052c285 --- /dev/null +++ b/main.go @@ -0,0 +1,18 @@ +package main + +import ( + "log" + + "github.com/charmbracelet/soft/config" + "github.com/charmbracelet/soft/server" +) + +func main() { + cfg := config.DefaultConfig() + s := server.NewServer(cfg) + log.Printf("Starting SSH server on %s:%d\n", cfg.Host, cfg.Port) + err := s.Start() + if err != nil { + log.Fatalln(err) + } +}