func main() { log.Infof("Starting Helphone API service on port %s", port) router := service.NewRouter() h := service.MuxWrapper{ IsReady: false, Router: router, } go manager.Init() handler := handlers.CompressHandler(handlers.ProxyHeaders(cors.Default().Handler(h.Router))) log.Fatal(http.ListenAndServe(":"+port, handler)) }
func init() { manager.Init() <-manager.ReadyChannel }