We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f1f073 commit f5049e2Copy full SHA for f5049e2
1 file changed
apps/web/src/lib/fetch.ts
@@ -2,12 +2,10 @@ import { treaty } from "@elysiajs/eden";
2
import type { App } from "@repo/api";
3
4
// Prefer Vite env if available, then process.env (for SSR/tests), else default.
5
-const VITE_URL = import.meta.env.VITE_API_BASE_URL as
6
- | string
7
- | undefined;
+const VITE_URL = import.meta.env.VITE_API_BASE_URL as string | undefined;
8
const NODE_URL = (process as any)?.env?.API_BASE_URL as string | undefined;
9
10
-let API_BASE_URL = VITE_URL ?? NODE_URL ?? "http://localhost:20257";
+let API_BASE_URL = VITE_URL ?? NODE_URL;
11
12
// Ensure URL has protocol for fetch
13
if (!/^https?:\/\//i.test(API_BASE_URL)) {
@@ -20,4 +18,4 @@ const app = treaty<App>(API_BASE_URL, {
20
18
},
21
19
});
22
23
-export default app;
+export default app;
0 commit comments