env schema.mjs reading values as number

Most of the times env vars are strings, so my schema definition of a value looks like NEXTAUTH_URL: z.string() for those vars. But if I want to read numeric values like a port, it seems I can't just do EMAIL_SERVER_PORT: z.number(). Do I generally have to read env vars as string-ish values, and have to parse them to numeric values in my code later on, or am I doing something wrong?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server