Fix connection url

This commit is contained in:
Beverly Nguyen
2025-04-21 15:56:19 -07:00
parent d6baaebef8
commit 3328853bd0
3 changed files with 7 additions and 3 deletions

View File

@@ -13,11 +13,12 @@ document.addEventListener('DOMContentLoaded', function () {
const jobEl = document.querySelector('[data-job-id]');
const jobId = jobEl?.dataset?.jobId;
const featureEnabled = jobEl?.dataset?.feature === 'true';
const apiHost = jobEl?.dataset?.host;
if (!jobId) return;
if (featureEnabled) {
const socket = io('http://localhost:6011');
const socket = io(apiHost);
socket.on('connect', () => {
socket.emit('join', { room: `job-${jobId}` });