package main import ( "app.yhyue.com/moapp/jybase/common" "app.yhyue.com/moapp/jybase/go-xweb/xweb" "app.yhyue.com/moapp/jybase/redis" "log" "seplatform/client" _ "seplatform/filter" "seplatform/front" "seplatform/recharge" "seplatform/service" "seplatform/util" "time" ) func init() { common.ReadConfig(&util.Sysconfig) //初始化配置 util.InitMgoPool() //初始化连接 util.InitOther() //xweb框架配置 xweb.Config.RecoverPanic = true xweb.Config.Profiler = true xweb.RootApp().AppConfig.TemplateDir = "web/templates" xweb.RootApp().AppConfig.StaticDir = "web/res" xweb.RootApp().AppConfig.StaticFileVersion = false xweb.RootApp().AppConfig.CheckXsrf = false xweb.RootApp().AppConfig.ReloadTemplates = true xweb.RootApp().AppConfig.EnableHttpCache = false xweb.RootApp().AppConfig.Mode = xweb.Product xweb.RootApp().AppConfig.CacheTemplates = false xweb.AddAction(&front.Front{}) xweb.AddAction(&service.Rule{}) xweb.AddAction(&service.Feedback{}) xweb.AddAction(&service.Private{}) xweb.AddAction(&service.Customer{}) xweb.AddAction(&service.SecondPush{}) xweb.AddAction(&client.Client{}) xweb.AddAction(&client.OwnTag{}) xweb.AddAction(&client.CustomerRule{}) xweb.AddAction(&recharge.EntRecharge{}) xweb.RootApp().AppConfig.SessionTimeout = 7 * 24 * time.Hour xweb.RootApp().Logger.SetOutputLevel(1) redis.Del("datag", "jyqyfw_es_query") } func main() { log.Println("port:", util.Sysconfig["port"]) xweb.Run(":" + common.ObjToString(util.Sysconfig["port"])) }