Flarum 实时更新帖子的方法
Flarum自带一个插件,名叫 Pusher,用来进行实时推送新帖的功能。当有新帖子时会在首页提示刷新或侧栏显示。
环境配置:
Flarum 版本:v1.8.5
编写日期:2024-05-06
由于 Pusher 服务器在国外,如果你服务器在国内可能出现无法推送或者推送延迟,请知悉,这功能不是必要的,国内用户也可能因为网络原因无法连上 pusher.js,导致加载时间长。
配置:

- cluster:是pusher服务器节点,选择距离你服务器最快的那个,国内选择亚洲节点的日本可能比较快。
2. 进入你刚才创建的应用
3. App Keys 就是我们需要用到的配置内容

4. 打开你的 Flarum 站点管理后台
5. 启用 Pusher 扩展(自带的,不需要安装)
6. 把 App keys 的内容对应填上,保存即可。

然后你发个新帖,看看首页有没有提示。

