diff --git a/cmd/main.go b/cmd/main.go index 1541a10..105f1ef 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -7,7 +7,6 @@ import ( "log" "net" "net/http" - "os" "time" router "synf/internal/api/routes" @@ -27,7 +26,7 @@ type model struct { selected map[int]struct{} } -func initalModel() model { +func commands() model { return model{ choices: []string{"start", "migrate", "reset-migrations"}, selected: make(map[int]struct{}), @@ -142,9 +141,16 @@ func RawConnect(host string, port string) { } func main() { - p := tea.NewProgram(initalModel()) - if _, err := p.Run(); err != nil { - fmt.Printf("Alas, there's been an error: %v", err) - os.Exit(1) - } + /* + p := tea.NewProgram(commands()) + if _, err := p.Run(); err != nil { + fmt.Printf("Alas, there's been an error: %v", err) + os.Exit(1) + } + */ + + PORT = ":8500" + + r := router.InitRestRoutes() + log.Fatal(http.ListenAndServe(PORT, r)) }