Exemple #1
1
func Init(e *echo.Echo) {
	const (
		indexPath    string = "public/views/index.html"
		faviconPath  string = "public/favicon.ico"
		templatePath string = "public/views"
		staticPath   string = "public/static"
	)

	e.Index(indexPath)
	e.Favicon(faviconPath)
	e.Static("/static", staticPath)

	initTemplate(e, templatePath)
}
Exemple #2
0
//	注册路由
func registerRoute(e *echo.Echo) {

	e.Get("/", welcome)
	e.Favicon("favicon.ico")

	e.Get("/:market/:code/:start/:end/1m", queryPeroid60)
}
Exemple #3
0
func Set(e *echo.Echo) *echo.Echo {

	e.Favicon("static/favicon.ico")
	e.Static("/", "static")

	e.Get("/", controller.Index)
	e.Get("/eval/", controller.Eval)
	e.Post("/eval/", controller.PostEval)

	return e
}