Esempio n. 1
0
File: main.go Progetto: 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))
}
Esempio n. 2
0
func init() {
	manager.Init()
	<-manager.ReadyChannel
}