diff options
author | Grail Finder <wohilas@gmail.com> | 2025-02-06 16:57:37 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2025-02-06 16:57:37 +0300 |
commit | 884004a855980444319769d9b10f9cf6e3ba33cd (patch) | |
tree | 3753697d0dd0e341595a1e15fb8aee9f1c06833b /main.go | |
parent | 6676b7d12b3bb381fdfacea816d50e9b86f9333d (diff) |
Enha: server update
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -3,7 +3,6 @@ package main import ( "flag" "fmt" - "net/http" "unicode" "github.com/rivo/tview" @@ -30,10 +29,8 @@ func main() { apiPort := flag.Int("port", 0, "port to host api") flag.Parse() if apiPort != nil && *apiPort > 3000 { - // start api server - http.HandleFunc("POST /completion", completion) - http.ListenAndServe(fmt.Sprintf(":%d", *apiPort), nil) - // no tui + srv := Server{} + srv.ListenToRequests(fmt.Sprintf("%d", *apiPort)) return } pages.AddPage("main", flex, true, true) |