Files
FlightsAPI/resources/js/bootstrap.js
T
2026-07-01 22:11:24 +10:00

23 lines
545 B
JavaScript

import axios from 'axios';
window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
import Echo from 'laravel-echo';
import Pusher from 'pusher-js';
window.Pusher = Pusher;
const { data } = await axios.get('/broadcasting/config');
window.Echo = new Echo({
broadcaster: 'reverb',
key: data.key,
wsHost: data.host,
wsPort: data.port,
wssPort: data.port,
forceTLS: data.scheme === 'https',
enabledTransports: ['ws', 'wss'],
});
window.vapidPublicKey = data.vapidPublicKey;