Пример #1
0
func main() {
	// init configs
	setting.LoadConfig()

	// init models
	models.Init(setting.IsProMode)

	// init social
	social.SetORM(models.ORM())
	setting.SocialAuth = social.NewSocial("/login/", auth.SocialAuther)
	setting.SocialAuth.ConnectSuccessURL = "/settings/profile"
	setting.SocialAuth.ConnectFailedURL = "/settings/profile"
	setting.SocialAuth.ConnectRegisterURL = "/register/connect"
	setting.SocialAuth.LoginURL = "/login"

	// init tango
	t := initTango(setting.IsProMode)

	// init routers
	routers.Init(t)

	// run
	setting.Log.Info("start WeGo", "v"+setting.APP_VER, setting.AppUrl)
	t.Run(setting.AppHost)
}
Пример #2
0
func init() {
	models.Init(false)
}