Skip to content

Commit 605ec4b

Browse files
fix(env): drop EDGEDB_DSN as not used in code. make port optional (dev only)
1 parent 203f346 commit 605ec4b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/env.mjs

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ export const env = createEnv({
1010
*/
1111
server: {
1212
NODE_ENV: z.enum(["development", "test", "production"]),
13-
PORT: z.coerce.number(), // From `next dev -p $PORT`
14-
EDGEDB_DSN: z.string(),
13+
/**
14+
* The port obtained from `next dev -p $PORT`
15+
* @optional - only supplied in local development (automatically by next.js)
16+
*/
17+
PORT: z.coerce.number().optional(),
1518
},
1619

1720
/**
@@ -30,7 +33,6 @@ export const env = createEnv({
3033
runtimeEnv: {
3134
NODE_ENV: process.env.NODE_ENV,
3235
PORT: process.env.PORT,
33-
EDGEDB_DSN: process.env.EDGEDB_DSN,
3436
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR,
3537
},
3638
/**

0 commit comments

Comments
 (0)