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
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
});
Hope this helps.