Skip to content

Commit

Permalink
updated env validation
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomorebonato committed Jun 27, 2023
1 parent 058cf25 commit aa07526
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions server/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,11 @@ dotenv.config()
const envSchema = z.object({
DATABASE_URL: z.string().min(1),
DATABASE_AUTH_TOKEN: z.string().min(1).optional(),
GOOGLE_CLIENT_ID: z.string(),
GOOGLE_CLIENT_SECRET: z.string(),
NODE_ENV: z
.enum(['development', 'production', 'test'])
.default('development'),
PORT: z.preprocess(Number, z.number()),
SITE_URL: z.string(),
JWT_SECRET: z.string(),
GITHUB_CLIENT_ID: z.string().optional(),
GITHUB_SECRET: z.string().optional(),
SECRET_KEY: z.string(),
SECRET_IV: z.string(),
})

export const env = envSchema.parse(process.env)
Expand Down

0 comments on commit aa07526

Please sign in to comment.