chore: make the localhost port in the trpc Provider dynamic to work on ports other than 3000

This commit is contained in:
Arvid Norlin
2024-04-12 15:55:22 +02:00
parent 7797f5d0b0
commit 0a3292a354
2 changed files with 5 additions and 5 deletions

6
env/client.ts vendored
View File

@@ -1,8 +1,8 @@
import { createEnv } from "@t3-oss/env-nextjs"
// import { z } from "zod";
import { z } from "zod"
export const env = createEnv({
client: {},
client: { NEXT_PUBLIC_PORT: z.string().optional() },
emptyStringAsUndefined: true,
runtimeEnv: {},
runtimeEnv: { NEXT_PUBLIC_PORT: process.env.PORT },
})