Deploy: Migrate to Gitea Actions, update paths for turbotrades.dev
Some checks failed
Deploy to Production / Deploy to turbotrades.dev (push) Has been cancelled

This commit is contained in:
2026-01-11 00:15:14 +00:00
parent 53d0c89d17
commit f9156897ce
6 changed files with 1567 additions and 140 deletions

View File

@@ -31,10 +31,19 @@ export const useWebSocketStore = defineStore("websocket", () => {
// Helper functions
const getWebSocketUrl = () => {
// Use environment variable or fallback to ws subdomain
if (import.meta.env.VITE_WS_URL) {
return import.meta.env.VITE_WS_URL;
}
// In production, use dedicated WebSocket domain
if (import.meta.env.PROD) {
return "wss://ws.turbotrades.dev";
}
// In development, use current host with ws path (for proxy)
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
const host = window.location.host;
// Always use the current host (works with VS Code tunnels and proxies)
return `${protocol}//${host}/ws`;
};