Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用官方的 js 插件 #12

Open
xee2211 opened this issue Jul 4, 2024 · 0 comments
Open

使用官方的 js 插件 #12

xee2211 opened this issue Jul 4, 2024 · 0 comments

Comments

@xee2211
Copy link

xee2211 commented Jul 4, 2024

使用官方的 js 插件 怎么传参数

new Push({
url: 'ws://127.0.0.1:3131', // websocket地址
app_key: '2d4271d4d40e6f3571e8aa7ef79ebbcf',
auth: '/plugin/webman/push/auth' // 订阅鉴权(仅限于私有频道)
})

这几个参数对应的是
import Pusher from 'pusher-js';
const pusher = new Pusher(APP_KEY, {
cluster: APP_CLUSTER,
channelAuthorization: {
endpoint: 'http://example.com/pusher/auth'
},
});

有demo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant