[feature] on start start the routes and the local server
This commit is contained in:
parent
5ba91f888c
commit
1aa929079f
10
cmd/main.go
10
cmd/main.go
@ -35,6 +35,11 @@ func initalModel() model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m model) Init() tea.Cmd {
|
func (m model) Init() tea.Cmd {
|
||||||
|
PORT = ":8500"
|
||||||
|
|
||||||
|
r := router.InitRestRoutes()
|
||||||
|
log.Fatal(http.ListenAndServe(PORT, r))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,9 +147,4 @@ func main() {
|
|||||||
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