dongwuqi4243 2018-11-29 15:17
浏览 373

Beego热编译websocket配置问题

I've just started to explore Beego web framework (v1.10.0) and created new project using bee tool by this command bee new hello

Assuming documentation Beego provides hot compile freature to take effect of any changes on the fly. Also there is reload.min.js file with a function inside for page reloading which listens for updates via websocket channel from a server.

By default websocket address is set to ws://localhost:12450/reload but I can't find how to configure websocket endpoint on the server side. So the client side can not establish websocket connection with server by default configs and not able to listen for updates.

How to configure websocket endpoint for hot compile feature in Beego?

Is it possible to simply set this params (host, port, endpoint) for websocket in app.conf file?

My app.conf file now:

appname = hello
httpport = 8080
runmode = dev

I really want to use this awesome feature fully.

U.P.D.

Actually, I found this package /go/src/github.com/astaxie/beego/grace/ for hot reloading feature but have no idea how to fix it. Seems it is under development since there is no configuration for websocket reload endpoint with port 12450 as I it is in reload.min.js file. Ok..

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制
    • ¥20 usb设备兼容性问题
    • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
    • ¥15 安装svn网络有问题怎么办
    • ¥15 vue2登录调用后端接口如何实现