[feature] on start start the routes and the local server

This commit is contained in:
Abdellah El Morabit 2025-11-02 17:51:07 +01:00
parent 5ba91f888c
commit 1aa929079f

View File

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