示例#1
0
文件: wechat.go 项目: fxgcj/fx
func init() {
	config = conf.GetConfig()
	if config == nil {
		log.Panic("config is nil")
	}
	//	RegDB()
}
示例#2
0
文件: main.go 项目: 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)
}