mirror of
https://github.com/jcreek/EstimationPoker.git
synced 2026-07-12 18:43:47 +00:00
feat(*): Update ws urls
This commit is contained in:
@@ -5,16 +5,14 @@ function generateRoomID() {
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
function connectToWebSocket(roomID, onMessageReceived) {
|
function connectToWebSocket(roomId, onMessageReceived) {
|
||||||
const socketPath = `.netlify/functions/websocket`;
|
let socket;
|
||||||
let socket = new WebSocket(`wss://estimationpoker.jcreek.co.uk/${socketPath}`);
|
const isDevelopment = import.meta.env.DEV;
|
||||||
|
if (isDevelopment) {
|
||||||
// const isDevelopment = import.meta.env.DEV;
|
socket = new WebSocket(`ws://localhost:3000`);
|
||||||
// if (isDevelopment) {
|
} else {
|
||||||
// socket = new WebSocket(`wss://localhost:4173/${socketPath}`);
|
socket = new WebSocket(`wss://estimationpoker.jcreek.co.uk`);
|
||||||
// } else {
|
}
|
||||||
// socket = new WebSocket(`wss://estimationpoker.jcreek.co.uk/${socketPath}`);
|
|
||||||
// }
|
|
||||||
|
|
||||||
socket.addEventListener('open', () => {
|
socket.addEventListener('open', () => {
|
||||||
console.log(`Connected to WebSocket server from roomID: ${roomId}`);
|
console.log(`Connected to WebSocket server from roomID: ${roomId}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user