Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "authHost": "http://api.domain.local",
- "authEndpoint": "/broadcasting/auth",
- "clients": [],
- "database": "redis",
- "databaseConfig": {
- "redis": {},
- "sqlite": {
- "databasePath": "/database/laravel-echo-server.sqlite"
- }
- },
- "devMode": true,
- "host": null,
- "port": "6001",
- "protocol": "http",
- "socketio": {},
- "sslCertPath": "",
- "sslKeyPath": "",
- "sslCertChainPath": "",
- "sslPassphrase": "",
- "subscribers": {
- "http": true,
- "redis": true
- },
- "apiOriginAllow": {
- "allowCors": true,
- "allowOrigin": "http://localhost:3000",
- "allowMethods": "GET, POST",
- "allowHeaders": "Origin, Content-Type, X-Auth-Token, X-Requested-With, Accept, Authorization, X-CSRF-TOKEN, X-Socket-Id"
- }
- }
- import Echo from 'laravel-echo';
- import env from '../env/env';
- import axios from 'axios';
- window.axios = axios.create({
- withCredentials: true,
- crossDomain: true,
- });
- window.io = require('socket.io-client');
- const EchoServer = new Echo({
- broadcaster: 'socket.io',
- host: window.location.hostname + ':6001'
- });
- export default EchoServer;
Add Comment
Please, Sign In to add comment