示例#1
0
文件: main.go 项目: artwebs/aogo
func main() {
	version := flag.Bool("version", false, "--version")

	flag.Parse()
	log.Info("version:v1.0.0")
	if *version {
		return
	}
	reload()
	web.Router("/", &IndexController{}, "Index")
	web.Run()

}
示例#2
0
文件: web_demo.go 项目: artwebs/aogo
func webRun() {
	web.Router("/tet", &TestController{}, "Index")
	web.Router("/tpl", &TestController{}, "TestTpl")
	web.AutoRouter("/", &TestController{})
	ns := web.NewNamespace("/ns",
		web.NSRouter("/demo", &TestController{}, "TestTpl"),
		web.NSRouter("/demo1", &TestController{}, "Index"),
		web.NSNamespace("/demo2",
			web.NSRouter("/demo1", &TestController{}, "Index"),
		),
		web.NSAutoRouter("/", &TestController{}),
	)
	web.AddNamespace(ns)
	web.Run()
}
示例#3
0
文件: main.go 项目: artwebs/aogo
func main() {
	version := flag.Bool("version", false, "--version")
	flag.Parse()
	log.Info("version:v1.0.0")
	if *version {
		return
	}
	sessions = make(map[string]*Session)

	reload()
	web.Router("/", &IndexController{}, "Index")
	web.HandleFunc("/reload", GOReload)
	web.Run()

}