coolify/resources/js/app.js

35 lines
925 B
JavaScript
Raw Normal View History

2023-05-10 17:26:28 +00:00
import Alpine from "alpinejs";
2023-12-05 10:17:52 +00:00
import Echo from 'laravel-echo';
import Pusher from 'pusher-js';
2023-06-05 22:18:48 +00:00
import { createApp } from "vue";
import MagicBar from "./components/MagicBar.vue";
2023-06-15 08:48:13 +00:00
import Toaster from "../../vendor/masmerise/livewire-toaster/resources/js";
2023-12-05 10:17:52 +00:00
window.Pusher = Pusher;
window.Echo = new Echo({
broadcaster: 'pusher',
2023-12-05 10:47:40 +00:00
cluster: import.meta.env.VITE_PUSHER_HOST || window.location.hostname,
2023-12-05 10:17:52 +00:00
key: import.meta.env.VITE_PUSHER_APP_KEY,
2023-12-05 10:47:40 +00:00
wsHost: import.meta.env.VITE_PUSHER_HOST || window.location.hostname,
wsPort: import.meta.env.VITE_PUSHER_PORT || 6001,
wssPort: import.meta.env.VITE_PUSHER_PORT || 6001,
2023-12-05 10:17:52 +00:00
forceTLS: false,
encrypted: true,
disableStats: false,
enableLogging: true,
enabledTransports: ['ws', 'wss'],
});
2023-12-04 14:42:08 +00:00
2023-06-15 08:48:13 +00:00
Alpine.plugin(Toaster);
2023-05-10 17:26:28 +00:00
window.Alpine = Alpine;
Alpine.start();
2023-05-10 13:49:56 +00:00
2023-06-05 22:18:48 +00:00
const app = createApp({});
app.component("magic-bar", MagicBar);
app.mount("#vue");
2023-12-04 14:42:08 +00:00
2023-12-04 19:47:32 +00:00