示例#1
0
文件: main.go 项目: wcgh/beewechat
func init() {
	config := conf.NewConfig()
	force := false   // 强制重新建表
	verbose := false // 打印SQL语句
	orm.Debug = true

	orm.RegisterDriver("mysql", orm.DR_MySQL)
	orm.RegisterDataBase("default", "mysql", config.WX_MYSQL_CONN)
	wechat.RegDB()
	orm.RunSyncdb("default", force, verbose)
}
示例#2
0
func init() {
	config = conf.NewConfig()
}
示例#3
0
文件: wechat.go 项目: wcgh/beewechat
func init() {
	config = conf.NewConfig()
	redcli.Addr = config.REDIS_ADDR
}
示例#4
0
文件: js_api.go 项目: wcgh/beewechat
func init() {
	config = conf.NewConfig()
	redcli.Addr = config.REDIS_ADDR
	log = log.New(os.Stdout, "CKEYER - ", log.LstdFlags)
}