From c494d0b855b16689aed905b21f13c2c3f559fdae Mon Sep 17 00:00:00 2001 From: Umar Adilov <99314948+adilovcode@users.noreply.github.com> Date: Mon, 19 Jan 2026 13:38:53 +0500 Subject: [PATCH] Added env for client connection --- apps/client/src/lib/trpc.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/client/src/lib/trpc.ts b/apps/client/src/lib/trpc.ts index ea7d6a7..7733109 100644 --- a/apps/client/src/lib/trpc.ts +++ b/apps/client/src/lib/trpc.ts @@ -12,7 +12,8 @@ export const trpc: CreateTRPCReact = * Get the base URL for tRPC requests */ const BASE_URL = - process.env.VITE_TRPC_URL || + (typeof globalThis.process !== "undefined" && + globalThis.process.env?.VITE_TRPC_URL) || import.meta.env.VITE_TRPC_URL || "http://localhost:3001/api";