switched api back to main thread
This commit is contained in:
parent
ad7a1e79e3
commit
d6a3783b20
13
main.go
13
main.go
@ -48,13 +48,8 @@ func main() {
|
||||
//init api routes
|
||||
apiMux := api.Routes()
|
||||
//run api server
|
||||
go func() {
|
||||
err := http.ListenAndServe(":4001", c.Handler(apiMux))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}()
|
||||
|
||||
// block main thread
|
||||
select {}
|
||||
err = http.ListenAndServe(":4001", c.Handler(apiMux))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user