🦋 Adds location for socket connection
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
const location = import.meta.env.DEV ? "leika.local" : window.location.host
|
||||
const forWeb = import.meta.env.MODE === "WEB"
|
||||
const mock = import.meta.env.MODE === "MOCK"
|
||||
|
||||
const location = mock ? `${window.location.hostname}:2096` : "leika.local"
|
||||
|
||||
export const socketLocation = forWeb ? `wss://${window.location.hostname}:2096` : `ws://${location}`
|
||||
|
||||
export default location;
|
||||
Reference in New Issue
Block a user