❄️ The winter sale is here. 25% off for a limited time. Join us →

Laravel
soketi
1
307

Robert

Started this discussion 1 month ago

Hi there, i am trying to create a soketi server in my machine. All examples i have found are for laravel MIX and the newest versions use VITE. is there any information any of you can point me out for the Env, and boostrap configuration directions? thanks for your help

Haz

Replied 1 month ago

Hello,

Just prefix them with VITE_ instead.

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
import Echo from 'laravel-echo';
import Pusher from 'pusher-js';
 
window.Pusher = Pusher;
 
window.Echo = new Echo({
    broadcaster: 'pusher',
    key: import.meta.env.VITE_PUSHER_APP_KEY,
    cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER,
    forceTLS: true
});

Client Side Installation

Hope this helps.