[bugfix] temporary fix, starting the routes without the tui
This commit is contained in:
parent
1aa929079f
commit
0826600ee3
12
cmd/main.go
12
cmd/main.go
@ -7,7 +7,6 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
router "synf/internal/api/routes"
|
router "synf/internal/api/routes"
|
||||||
@ -27,7 +26,7 @@ type model struct {
|
|||||||
selected map[int]struct{}
|
selected map[int]struct{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func initalModel() model {
|
func commands() model {
|
||||||
return model{
|
return model{
|
||||||
choices: []string{"start", "migrate", "reset-migrations"},
|
choices: []string{"start", "migrate", "reset-migrations"},
|
||||||
selected: make(map[int]struct{}),
|
selected: make(map[int]struct{}),
|
||||||
@ -142,9 +141,16 @@ func RawConnect(host string, port string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
p := tea.NewProgram(initalModel())
|
/*
|
||||||
|
p := tea.NewProgram(commands())
|
||||||
if _, err := p.Run(); err != nil {
|
if _, err := p.Run(); err != nil {
|
||||||
fmt.Printf("Alas, there's been an error: %v", err)
|
fmt.Printf("Alas, there's been an error: %v", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
PORT = ":8500"
|
||||||
|
|
||||||
|
r := router.InitRestRoutes()
|
||||||
|
log.Fatal(http.ListenAndServe(PORT, r))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user