feat: force port 3000 to make Next.js abort startup on multiple instances clashing on same port
This commit is contained in:
committed by
Michael Zetterberg
parent
7dc07c256c
commit
b738023a43
8
env/client.ts
vendored
8
env/client.ts
vendored
@@ -2,7 +2,11 @@ import { createEnv } from "@t3-oss/env-nextjs"
|
||||
import { z } from "zod"
|
||||
|
||||
export const env = createEnv({
|
||||
client: { NEXT_PUBLIC_PORT: z.string().optional() },
|
||||
client: {
|
||||
NEXT_PUBLIC_PORT: z.string().default("3000"),
|
||||
},
|
||||
emptyStringAsUndefined: true,
|
||||
runtimeEnv: { NEXT_PUBLIC_PORT: process.env.PORT },
|
||||
runtimeEnv: {
|
||||
NEXT_PUBLIC_PORT: process.env.NEXT_PUBLIC_PORT,
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user