Skip to content

Commit 310d634

Browse files
committed
Merge branch 'main' into rest-qr
2 parents a4db412 + 7e76ef9 commit 310d634

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/env.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,24 @@ import { z } from "zod"
33

44
const PORT = 6111
55

6+
const domainSchema = z
7+
.string()
8+
.default(`polinet.cc`)
9+
.describe(
10+
"This is the domain to use as shortener. API available at /api and Admin dashboard at /admin"
11+
)
12+
613
// coerce is needed for non-string values, because k8s supports only string env
714
export const env = createEnv({
815
client: {
9-
NEXT_PUBLIC_DOMAIN: z
10-
.string()
11-
.describe("Exposed to client side, same as env.DOMAIN"),
16+
NEXT_PUBLIC_DOMAIN: domainSchema,
1217
},
1318
server: {
1419
PORT: z.coerce.number().min(1).max(65535).default(PORT),
1520
NODE_ENV: z.enum(["development", "production"]).default("development"),
1621
// PUBLIC_URL: z.string().default(`https://polinet.cc`),
1722
// LOG_LEVEL: z.string().default("DEBUG"),
18-
DOMAIN: z
19-
.string()
20-
.default(`polinet.cc`)
21-
.describe(
22-
"This is the domain to use as shortener. API available at /api and Admin dashboard at /admin"
23-
),
24-
23+
DOMAIN: domainSchema,
2524
DB_HOST: z.string().min(1),
2625
DB_PORT: z.coerce.number().min(1).max(65535).default(5432),
2726
DB_USER: z.string().min(1),

0 commit comments

Comments
 (0)