🪖 Moves location to utilities

This commit is contained in:
Rune Harlyk
2024-02-22 23:57:15 +01:00
parent 700707ab18
commit 8a660a58ae
5 changed files with 6 additions and 7 deletions
@@ -0,0 +1,6 @@
const forWeb = import.meta.env.MODE === "WEB"
const mock = import.meta.env.MODE === "MOCK"
export const location = mock ? `${window.location.hostname}:2096` : "leika.local"
export const socketLocation = forWeb ? `wss://${window.location.hostname}:2096` : `ws://${location}`