Esempio n. 1
0
File: app.go Progetto: 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()
}
Esempio n. 2
0
File: app.go Progetto: 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()
}