Skip to content

Commit

Permalink
Make some envs optional
Browse files Browse the repository at this point in the history
  • Loading branch information
KMKoushik committed Jun 28, 2024
1 parent 57fcfbc commit 88549fe
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions apps/web/src/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export const env = createEnv({
AWS_DEFAULT_REGION: z.string().default("us-east-1"),
API_RATE_LIMIT: z
.string()
.transform((str) => parseInt(str, 10))
.default(1),
.default("1")
.transform((str) => parseInt(str, 10)),
FROM_EMAIL: z.string().optional(),
ADMIN_EMAIL: z.string().optional(),
DISCORD_WEBHOOK_URL: z.string().optional(),
Expand All @@ -55,7 +55,10 @@ export const env = createEnv({
*/
client: {
// NEXT_PUBLIC_CLIENTVAR: z.string(),
NEXT_PUBLIC_IS_CLOUD: z.string().transform((str) => str === "true"),
NEXT_PUBLIC_IS_CLOUD: z
.string()
.default("false")
.transform((str) => str === "true"),
},

/**
Expand Down

0 comments on commit 88549fe

Please sign in to comment.