export function createWebSocket() { let appUrl = process.env.APP_URL; if (appUrl.includes('localhost')) { appUrl = `//${appUrl}/chat-service`; } else { appUrl = `//${appUrl}/chat-service`; } return new WebSocket(appUrl); }