Exemplo n.º 1
0
Arquivo: main.go Projeto: helphone/api
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))
}
Exemplo n.º 2
0
func init() {
	manager.Init()
	<-manager.ReadyChannel
}