Last active
September 7, 2021 12:48
-
-
Save Ghostscypher/f7cfa67eb187b7ca5922b057df69341d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Decicated echo js file | |
*/ | |
import Echo from 'laravel-echo'; | |
window.Pusher = require('pusher-js'); | |
// If using http connection use this | |
window.Echo = new Echo({ | |
broadcaster: 'pusher', | |
key: process.env.MIX_PUSHER_APP_KEY, | |
cluster: process.env.MIX_PUSHER_APP_CLUSTER, | |
wsHost: 'example.com', // Your domain | |
encrypted: false, | |
wsPort: 80, // Yor http port | |
disableStats: true, // Change this to your liking this disables statistics | |
forceTLS: false, | |
enabledTransports: ['ws', 'wss'], | |
disabledTransports: ['sockjs', 'xhr_polling', 'xhr_streaming'] // Can be removed | |
}); | |
// For ssl connections use this | |
window.Echo = new Echo({ | |
broadcaster: 'pusher', | |
key: process.env.MIX_PUSHER_APP_KEY, | |
cluster: process.env.MIX_PUSHER_APP_CLUSTER, | |
wsHost: 'example.com', // Your domain | |
encrypted: true, | |
wssPort: 443, // Https port | |
disableStats: true, // Change this to your liking this disables statistics | |
forceTLS: true, | |
enabledTransports: ['ws', 'wss'], | |
disabledTransports: ['sockjs', 'xhr_polling', 'xhr_streaming'] // Can be removed | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment