Skip to content

Commit

Permalink
Zod coerce option
Browse files Browse the repository at this point in the history
  • Loading branch information
RaniAgus committed Jul 7, 2024
1 parent 8bb60a1 commit 62d2cf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const schema = z.object({
WEBHOOK_URL: z.string(),
CACHE_KEY: z.string(),
CACHE_URL: z.string().optional(),
PORT: z.number({ coerce: true }).lte(65535).default(3000),
PORT: z.coerce.number().lte(65535).default(3000),
});

const env = schema.parse(Bun.env);
Expand Down

0 comments on commit 62d2cf8

Please sign in to comment.