Skip to content

Instantly share code, notes, and snippets.

@Gimcrack
Created December 9, 2020 20:26
Show Gist options
  • Save Gimcrack/828cb4da947e558a2238895cad64dd1e to your computer and use it in GitHub Desktop.
Save Gimcrack/828cb4da947e558a2238895cad64dd1e to your computer and use it in GitHub Desktop.
Set up laravel-echo in bootstrap.js
/**
* Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/
import Echo from "laravel-echo"
window.Echo = new Echo({
broadcaster: 'socket.io',
host: '127.0.0.1:6001'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment