[bugfix] temporary fix, starting the routes without the tui

This commit is contained in:
Abdellah El Morabit 2025-11-02 17:56:11 +01:00
parent 1aa929079f
commit 0826600ee3

View File

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