mirror of
https://github.com/jcreek/EstimationPoker.git
synced 2026-07-12 18:43:47 +00:00
fix(*): Ensure new partykit url is respected
This commit is contained in:
@@ -6,14 +6,17 @@ function generateId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
const partyHost = import.meta.env.PUBLIC_PARTYKIT_HOST;
|
||||
const partyHost = import.meta.env.PUBLIC_PARTYKIT_HOST?.trim();
|
||||
const partyName = import.meta.env.PUBLIC_PARTYKIT_PARTY || 'main';
|
||||
|
||||
function getPartyKitHost() {
|
||||
if (partyHost) {
|
||||
return partyHost;
|
||||
}
|
||||
return import.meta.env.DEV ? 'localhost:1999' : 'websocket.jcreek.co.uk';
|
||||
if (import.meta.env.DEV) {
|
||||
return 'localhost:1999';
|
||||
}
|
||||
throw new Error('PUBLIC_PARTYKIT_HOST is not set for this build.');
|
||||
}
|
||||
|
||||
function connectToWebSocket(roomId, onMessageReceived) {
|
||||
|
||||
Reference in New Issue
Block a user