feat: implement lobby functionality with user and server information retrieval
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { createTRPCProxyClient, httpBatchLink } from '@trpc/client';
|
||||
import type { appRouter } from '../../../game-api/src/router';
|
||||
|
||||
export type GameRouter = typeof appRouter;
|
||||
|
||||
export const createGameTrpc = (port: number) => {
|
||||
return createTRPCProxyClient<GameRouter>({
|
||||
links: [
|
||||
httpBatchLink({
|
||||
url: `http://localhost:${port}/api/trpc`, // 실제 환경에서는 도메인/경로 조정 필요
|
||||
}),
|
||||
],
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user