func main() { conf := sockjs.NewConfig() sockjshandler := sockjs.NewHandler("/chat", chatHandler, conf) beego.Router("/", &MainController{}) beego.RouterHandler("/chat/:info(.*)", sockjshandler) beego.Run() }
func main() { beego.RESTRouter("/object", &controllers.ObejctController{}) beego.Run() }