func main() { cfg := flag.String("c", "cfg.json", "configuration file") flag.Parse() g.ParseConfig(*cfg) initFuncMap() go proc.PaddingIp() go proc.DeleteRbsRecord() go proc.CheckAuth() models.InitDatabase() // cache.InitCache() beego.Run() select {} }
func main() { beego.Router("/", &controllers.MainController{}) beego.Router("/ws", &controllers.WSController{}) beego.Run() }
func main() { beego.RESTRouter("/object", &controllers.ObjectController{}) beego.Run() }