We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70e3c5f commit 7178d85Copy full SHA for 7178d85
1 file changed
client/src/signalr/auctionHubClient.ts
@@ -23,7 +23,10 @@ export interface AuctionHubHandlers {
23
* the subscribers Map.
24
*/
25
26
-const HUB_URL = '/auctionHub';
+// SignalR hub URL. Reads from `VITE_SIGNALR_HUB_URL` at build time — the SPA can ship to a
27
+// different origin than the API (e.g. coiny.best for SPA + api.coiny.best for the hub). Falls
28
+// back to a same-origin relative path for local dev (`pnpm dev` proxies /auctionHub to localhost).
29
+const HUB_URL = import.meta.env.VITE_SIGNALR_HUB_URL ?? '/auctionHub';
30
31
let connection: HubConnection | null = null;
32
const subscribers = new Map<string, AuctionHubHandlers>();
0 commit comments