Esempio n. 1
0
File: wechat.go Progetto: fxgcj/fx
func init() {
	config = conf.GetConfig()
	if config == nil {
		log.Panic("config is nil")
	}
	//	RegDB()
}
Esempio n. 2
0
File: main.go Progetto: fxgcj/fx
func main() {
	config = conf.GetConfig()
	if config == nil {
		panic("config is nil ")
	}
	log.Debugf("%#v\n", *config)
	mux := http.NewServeMux()
	mux.HandleFunc("/", Filter)
	//	mux.HandleFunc("/upload", Receive)
	addr := fmt.Sprintf(":%d", config.App.Port)
	log.Notice("Http is running at ", addr)
	err := http.ListenAndServe(addr, mux)
	panic(err)
}