-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
46 lines (41 loc) · 1.05 KB
/
App.js
File metadata and controls
46 lines (41 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import './App.css';
import Echo from 'laravel-echo';
import Pusher from 'pusher-js';
import React from 'react';
import logo from './logo.svg';
class App extends React.Component {
componentDidMount() {
window.Echo = new Echo({
broadcaster: 'reverb',
key: '5kpwmxrlto6zmji68kjf',
wsHost: 'chat.irpsc.com',
wsPort: 2122,
wssPort: 2122,
disableStats: true,
forceTLS: false,
encrypted: true,
enabledTransports: ['wss', 'ws'],
authEndpoint: 'https://chat.irpsc.com/api/broadcasting/auth',
auth: {
headers: {
Authorization: 'Bearer ' + '22|m0FSiY1wQwGfnE3Y94V25P9okVmIjF5KRwSvnGhH',
Accept: 'application/json'
},
},
});
window.Echo.channel('test-channel')
.listen('.test-event', (e) => {
console.log(e)
})
}
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
</header>
</div>
);
}
}
export default App;