示例#1
0
文件: app.go 项目: jiorry/gotock
func main() {
	gos.Init()

	gos.Route("/", &home.Default{})
	gos.Route("/login", &user.Login{})
	gos.Route("/regist", &user.Regist{})

	gos.Route("/rzrq/sum", &rzrq.Sum{})
	gos.Route("/rzrq/stock/:code", &rzrq.Stock{})

	// open api router
	// gos.WebApiRoute("web", &api.Public{})

	// open api
	// api.RegistOpenApi()
	gos.WebApiRoute("open", &api.OpenApi{})

	// websocket router
	// gos.WebSocketRoute("conn", (*hiuser.UserWebSock)(nil))
	if gos.RunMode == "pro" {
		dfcf.RunAlertHgt()
	}

	gos.Start()
}
示例#2
0
文件: app.go 项目: kere/mdwriter
func main() {
	gos.Init()

	gos.Route("/", &home.Default{})
	gos.Route("/write", &home.Default{})
	gos.Route("/user/:name", &home.Default{})
	gos.Route("/write/:id", &home.Default{})
	gos.Route("/l/:nick/:page", &home.Default{})
	gos.Route("/article/:id", &home.Default{})
	gos.Route("/title/:title", &home.Default{})

	gos.Route("/login", &user.Login{})
	gos.Route("/regist", &user.Regist{})

	gos.WebApiRoute("open", &api.OpenApi{})
	gos.FileUploadRoute("images", &api.ImageUpload{})

	gos.Start()
}