Beispiel #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()

}
Beispiel #2
0
func SetGeneratorMacaron(m *macaron.Macaron) {
	//Setting Middleware
	middleware.SetMiddlewares(m)
	//Setting Router
	router.SetRouters(m)
}