Exemple #1
0
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))
}
Exemple #2
0
func init() {
	manager.Init()
	<-manager.ReadyChannel
}