Skip to content
This repository has been archived by the owner on Mar 18, 2023. It is now read-only.

pexch/nuxt-echo

Repository files navigation

@nuxtjs/laravel-echo

Laravel Echo for Nuxt.js 2x (Modified by FlyingSpoon)

Which Laravel Echo does this work with? (FlyingSpoon)

This has been tested with "laravel-echo": "^1.11.3", please install this version to avoid any issues with compatibility.

Module set-up (FlyingSpoon)

...
buildModules: [
	'@/modules/nuxt-echo'
]
...

Example nuxt.config.js (FlyingSpoon)

...
echo: {
    broadcaster: 'pusher',
    CSRFendpoint: 'http://127.0.0.1:8000/api/sanctum/csrf-cookie',
    authEndpoint: 'http://127.0.0.1:8000/api/broadcasting/auth',
    wsHost: '127.0.0.1',
    wsPort: 6001,
    key: 'bDYhf22uk2GvRPIrLxh2nFdhGZFR9zmP',
    encrypted: true,
    // enableLogging: true,
    connectOnLogin: false,
    disconnectOnLogout: false,
    disableStats: true,
    forceTLS: false,
    authModule: true
    // enabledTransports: ['ws', 'wss'],
    // plugins: [ '@/plugins/echo.js' ]
}
...

Requirements

If you use the broadcaster pusher, you need to ensure that you have pusher-js installed:

yarn add pusher-js # or npm install pusher-js

If you use the broadcaster socket.io, you need to ensure that you have socket.io-client installed:

yarn add socket.io-client # or npm install socket.io-client

License

MIT License

Copyright (c) Nuxt Community

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published