first commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import dotenv from "dotenv";
|
||||
import { z } from "zod";
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
dotenv.config({ path: path.resolve(__dirname, "../.env") });
|
||||
dotenv.config();
|
||||
|
||||
const envSchema = z.object({
|
||||
PORT: z.coerce.number().default(3001),
|
||||
SUPABASE_URL: z.string().url().optional(),
|
||||
SUPABASE_SERVICE_ROLE_KEY: z.string().optional(),
|
||||
REVENUECAT_WEBHOOK_SECRET: z.string().optional(),
|
||||
ROOT_DOMAIN: z.string().default("menul.io"),
|
||||
PUBLIC_WEB_URL: z.string().default(process.env.PUBLIC_WEB_URL ?? "http://localhost:3000"),
|
||||
GEMINI_API_KEY: z.string().optional(),
|
||||
OPENAI_API_KEY: z.string().optional(),
|
||||
});
|
||||
|
||||
export const env = envSchema.parse(process.env);
|
||||
|
||||
Reference in New Issue
Block a user