This commit is contained in:
liuliu
2025-12-15 13:30:35 +08:00
parent f771369e97
commit c99d5f4c19
2 changed files with 11 additions and 2 deletions
+2 -1
View File
@@ -2,4 +2,5 @@ import { treaty } from '@elysiajs/eden';
import type { App } from '../backend/api';
// Create a single client instance
export const client = treaty<App>('localhost:3000');
const domain = typeof window !== 'undefined' ? window.location.host : 'localhost:3000';
export const client = treaty<App>(domain);