예제 #1
0
func SetGeneratorMacaron(m *macaron.Macaron) {
	//Setting Middleware
	middleware.SetMiddlewares(m)
	//Setting Router
	router.SetRouters(m)
	//static
	if setting.RunMode == "dev" {
		m.Use(macaron.Static("external"))
	}

	if err := modules.LoadBuildList("/conf/pool.json"); err != nil {
		fmt.Printf("Read build pool config file /conf/pool.json error: %s", err.Error())
	}

	handler.InitHandlerList()

}
예제 #2
0
파일: web.go 프로젝트: pombredanne/wharf-1
func SetGeneratorMacaron(m *macaron.Macaron) {
	//Setting Middleware
	middleware.SetMiddlewares(m)
	//Setting Router
	router.SetRouters(m)
}