Skip to content

使用官方的 js 插件  #12

@xee2211

Description

@xee2211

使用官方的 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions