From 75d93010337a9409620f1743798291210ac7d99b Mon Sep 17 00:00:00 2001 From: philipp lang Date: Fri, 28 Jun 2024 12:10:18 +0200 Subject: [PATCH] Add echo port via mode --- resources/js/lib/echo.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/js/lib/echo.js b/resources/js/lib/echo.js index 7008f45e..151879b0 100644 --- a/resources/js/lib/echo.js +++ b/resources/js/lib/echo.js @@ -6,6 +6,8 @@ const toast = useToast(); window.Pusher = Pusher; +console.log(); + function handleJobEvent(event, type = 'success') { if (event.message) { toast[type](event.message); @@ -16,8 +18,8 @@ var echo = new Echo({ broadcaster: 'pusher', key: 'adremakey', wsHost: window.location.hostname, - wsPort: 80, - wssPort: 443, + wsPort: import.meta.env.MODE === 'development' ? 6001 : 80, + wssPort: import.meta.env.MODE === 'development' ? 6001 : 443, forceTLS: false, disableStats: true, cluster: 'adrema',