-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
laravel-echo-server.js
45 lines (43 loc) · 1.11 KB
/
laravel-echo-server.js
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
// https://github.com/tlaverdure/laravel-echo-server/issues/178
require('dotenv').config();
const env = process.env;
const EchoServer = require('laravel-echo-server');
EchoServer.run({
"authHost": env.APP_URL,
"authEndpoint": "/broadcasting/auth",
"clients": [
{
"appId": env.LARAVEL_ECHO_SERVER_CLIENT_APP_ID,
"key": env.LARAVEL_ECHO_SERVER_CLIENT_KEY
}
],
"database": "redis",
"databaseConfig": {
"redis": {
"host": env.REDIS_HOST,
"port": env.REDIS_PORT,
"db": env.REDIS_DB,
"keyPrefix": env.REDIS_PREFIX
},
"publishPresence": true
},
"devMode": env.APP_DEBUG === 'true',
"host": null,
"port": env.LARAVEL_ECHO_SERVER_PORT,
"protocol": "http",
"socketio": {},
"sslCertPath": "",
"sslKeyPath": "",
"sslCertChainPath": "",
"sslPassphrase": "",
"subscribers": {
"http": true,
"redis": true
},
"apiOriginAllow": {
"allowCors": false,
"allowOrigin": "",
"allowMethods": "",
"allowHeaders": ""
}
});