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
|
//init api routes
|
||||||
apiMux := api.Routes()
|
apiMux := api.Routes()
|
||||||
//run api server
|
//run api server
|
||||||
go func() {
|
err = http.ListenAndServe(":4001", c.Handler(apiMux))
|
||||||
err := http.ListenAndServe(":4001", c.Handler(apiMux))
|
if err != nil {
|
||||||
if err != nil {
|
log.Fatal(err)
|
||||||
log.Fatal(err)
|
}
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
// block main thread
|
|
||||||
select {}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user