使用webman/push 时,服务端初始化发生报错
$api = new Api(
// webman下可以直接使用config获取配置,非webman环境需要手动写入相应配置
'http://127.0.0.1:3232',
config('plugin.webman.push.app.app_key'),
config('plugin.webman.push.app.app_secret')
);
// 给订阅 user-1 的所有客户端推送 message 事件的消息
$api->trigger('user-1', 'message', [
'from_uid' => 2,
'content' => '你好,这个是消息内容'
]);
worker listen processes status
baobei-web-api http://0.0.0.0:8791 1 [ok]
monitor none 1 [ok]
plugin.webman.push.server websocket://0.0.0.0:3131 1 [ok]
Invalid app_key %3Capp_key%EF%BC%8C%E5%9C%A8config
最新的版本
js参数传错了