From 1aa929079f74224f0f995340a41000150ccea7b9 Mon Sep 17 00:00:00 2001 From: Abdellah El Morabit Date: Sun, 2 Nov 2025 17:51:07 +0100 Subject: [PATCH] [feature] on start start the routes and the local server --- cmd/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 7e7dfa8..1541a10 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -35,6 +35,11 @@ func initalModel() model { } func (m model) Init() tea.Cmd { + PORT = ":8500" + + r := router.InitRestRoutes() + log.Fatal(http.ListenAndServe(PORT, r)) + return nil } @@ -142,9 +147,4 @@ func main() { fmt.Printf("Alas, there's been an error: %v", err) os.Exit(1) } - - PORT = ":8500" - - r := router.InitRestRoutes() - log.Fatal(http.ListenAndServe(PORT, r)) }