Guest User

Untitled

a guest
Dec 11th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. {
  2. "authHost": "http://api.domain.local",
  3. "authEndpoint": "/broadcasting/auth",
  4. "clients": [],
  5. "database": "redis",
  6. "databaseConfig": {
  7. "redis": {},
  8. "sqlite": {
  9. "databasePath": "/database/laravel-echo-server.sqlite"
  10. }
  11. },
  12. "devMode": true,
  13. "host": null,
  14. "port": "6001",
  15. "protocol": "http",
  16. "socketio": {},
  17. "sslCertPath": "",
  18. "sslKeyPath": "",
  19. "sslCertChainPath": "",
  20. "sslPassphrase": "",
  21. "subscribers": {
  22. "http": true,
  23. "redis": true
  24. },
  25. "apiOriginAllow": {
  26. "allowCors": true,
  27. "allowOrigin": "http://localhost:3000",
  28. "allowMethods": "GET, POST",
  29. "allowHeaders": "Origin, Content-Type, X-Auth-Token, X-Requested-With, Accept, Authorization, X-CSRF-TOKEN, X-Socket-Id"
  30. }
  31. }
  32.  
  33. import Echo from 'laravel-echo';
  34. import env from '../env/env';
  35. import axios from 'axios';
  36.  
  37. window.axios = axios.create({
  38. withCredentials: true,
  39. crossDomain: true,
  40. });
  41.  
  42. window.io = require('socket.io-client');
  43.  
  44. const EchoServer = new Echo({
  45. broadcaster: 'socket.io',
  46. host: window.location.hostname + ':6001'
  47. });
  48.  
  49. export default EchoServer;
Add Comment
Please, Sign In to add comment