func main() { //run the websocket proxy //startWebsocketProxy() beego.AddAPPStartHook(hook) //run the web server to serve the static files beego.BConfig.WebConfig.StaticDir["/doc/static"] = "static" fmt.Println("write into database") //set session beego.Run() }
func init() { operation = new(Operation) beego.AddAPPStartHook(operation.Run) }