Skip to content

To host multiple app keys, you need to adjust its configuration to recognize which app key is associated with the current event or user.

Notifications You must be signed in to change notification settings

Programming-Mindset/laravel-reverb-multiple-clients

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Reverb Server .env Config

VITE_APP_NAME="${APP_NAME}"

REVERB_APP_ID=837962
REVERB_APP_KEY=gjk8nvkonzaajdclezae
REVERB_APP_SECRET=kgrqmx0dgcvq88pcbq8c
REVERB_HOST="reverb.local"
REVERB_PORT=8080
REVERB_SCHEME=http

REVERB_APP_ID_NOTICE2=837962122
REVERB_APP_KEY_NOTICE2=gjk8nvkonzaajdclezae122
REVERB_APP_SECRET_NOTICE2=kgrqmx0dgcvq88pcbq8c122
REVERB_HOST="reverb.local"
REVERB_PORT=8080
REVERB_SCHEME=http

REVERB_APP_ID_NOTICE3=837962133
REVERB_APP_KEY_NOTICE3=gjk8nvkonzaajdclezae133
REVERB_APP_SECRET_NOTICE3=kgrqmx0dgcvq88pcbq8c133
REVERB_HOST="reverb.local"
REVERB_PORT=8080
REVERB_SCHEME=http

VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"

Reverb Server config/broadcasting.php

'connections' => [

    'reverb' => [
        'driver' => 'reverb',
        'key' => env('REVERB_APP_KEY'),
        'secret' => env('REVERB_APP_SECRET'),
        'app_id' => env('REVERB_APP_ID'),
        'options' => [
            'host' => env('REVERB_HOST'),
            'port' => env('REVERB_PORT', 443),
            'scheme' => env('REVERB_SCHEME', 'https'),
            'useTLS' => env('REVERB_SCHEME', 'https') === 'https',
        ],
        'client_options' => [
            // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
        ],
    ],
    'reverb1' => [
        'driver' => 'reverb',
        'key' => env('REVERB_APP_KEY'),
        'secret' => env('REVERB_APP_SECRET'),
        'app_id' => env('REVERB_APP_ID'),
        'options' => [
            'host' => env('REVERB_HOST'),
            'port' => env('REVERB_PORT', 443),
            'scheme' => env('REVERB_SCHEME', 'https'),
            'useTLS' => env('REVERB_SCHEME', 'https') === 'https',
        ],
        'client_options' => [
            // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
        ],
    ],
    'reverb2' => [
        'driver' => 'reverb',
        'key' => env('REVERB_APP_KEY_NOTICE2'),
        'secret' => env('REVERB_APP_SECRET_NOTICE2'),
        'app_id' => env('REVERB_APP_ID_NOTICE2'),
        'options' => [
            'host' => env('REVERB_HOST'),
            'port' => env('REVERB_PORT', 443),
            'scheme' => env('REVERB_SCHEME', 'https'),
            'useTLS' => env('REVERB_SCHEME', 'https') === 'https',
        ],
        'client_options' => [
            // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
        ],
    ],
    
    'reverb3' => [
        'driver' => 'reverb',
        'key' => env('REVERB_APP_KEY_NOTICE3'),
        'secret' => env('REVERB_APP_SECRET_NOTICE3'),
        'app_id' => env('REVERB_APP_ID_NOTICE3'),
        'options' => [
            'host' => env('REVERB_HOST'),
            'port' => env('REVERB_PORT', 443),
            'scheme' => env('REVERB_SCHEME', 'https'),
            'useTLS' => env('REVERB_SCHEME', 'https') === 'https',
        ],
        'client_options' => [
            // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
        ],
    ],
]

Client Server 1

VITE_APP_NAME="${APP_NAME}"

REVERB_APP_ID=837962111
REVERB_APP_KEY=gjk8nvkonzaajdclezae11
REVERB_APP_SECRET=kgrqmx0dgcvq88pcbq8c111
REVERB_HOST="reverb.local"
REVERB_PORT=8080
REVERB_SCHEME=http

VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"

Client Server 2

VITE_APP_NAME="${APP_NAME}"

REVERB_APP_ID=837962122
REVERB_APP_KEY=gjk8nvkonzaajdclezae122
REVERB_APP_SECRET=kgrqmx0dgcvq88pcbq8c122
REVERB_HOST="reverb.local"
REVERB_PORT=8080
REVERB_SCHEME=http

VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"

Client Server 3

VITE_APP_NAME="${APP_NAME}"

REVERB_APP_ID=837962133
REVERB_APP_KEY=gjk8nvkonzaajdclezae133
REVERB_APP_SECRET=kgrqmx0dgcvq88pcbq8c133
REVERB_HOST="reverb.local"
REVERB_PORT=8080
REVERB_SCHEME=http

VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"

Host Config C://windows/system32/drive/etc/hosts

192.168.1.120    reverb.local
192.168.1.120    notice.local
192.168.1.120    notice2.local

About

To host multiple app keys, you need to adjust its configuration to recognize which app key is associated with the current event or user.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published