mirror of
https://github.com/khairul169/code-share.git
synced 2025-06-17 17:19:34 +07:00
12 lines
320 B
TypeScript
12 lines
320 B
TypeScript
|
import { createTRPCReact } from "@trpc/react-query";
|
||
|
import type { AppRouter } from "@/server/routers/_app";
|
||
|
|
||
|
export const getBaseUrl = () => {
|
||
|
if (typeof window !== "undefined") return "";
|
||
|
return `http://localhost:${process.env.PORT ?? 3000}`;
|
||
|
};
|
||
|
|
||
|
const trpc = createTRPCReact<AppRouter>({});
|
||
|
|
||
|
export default trpc;
|