[GH-ISSUE #780] Using this in combination with http.ListenAndServe #571

Closed
opened 2026-03-04 01:06:08 +03:00 by kerem · 1 comment
Owner

Originally created by @Fyb3roptik on GitHub (Dec 14, 2022).
Original GitHub issue: https://github.com/rivo/tview/issues/780

How can I use this package along side an API? I cannot for the life of me find anywhere this is happening in any of the examples. How do you "run code" inside of the run statement?!

Originally created by @Fyb3roptik on GitHub (Dec 14, 2022). Original GitHub issue: https://github.com/rivo/tview/issues/780 How can I use this package along side an API? I cannot for the life of me find anywhere this is happening in any of the examples. How do you "run code" inside of the run statement?!
kerem closed this issue 2026-03-04 01:06:08 +03:00
Author
Owner

@Fyb3roptik commented on GitHub (Dec 14, 2022):

Used a go routine for the http server nevermind :)

go func() {
    http.ListenAndServe(fmt.Sprintf("%s:%s", cfg.Server.Host, cfg.Server.Port), router)
}()
<!-- gh-comment-id:1352318871 --> @Fyb3roptik commented on GitHub (Dec 14, 2022): Used a go routine for the http server nevermind :) ```go go func() { http.ListenAndServe(fmt.Sprintf("%s:%s", cfg.Server.Host, cfg.Server.Port), router) }() ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#571
No description provided.