Initial working state: CL3.5 complete (Plesk sync + suspend/unsuspend)
This commit is contained in:
25
lib/env.ts
Normal file
25
lib/env.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
const requiredEnvs = [
|
||||
"NEXT_PUBLIC_SUPABASE_URL",
|
||||
"NEXT_PUBLIC_SUPABASE_ANON_KEY",
|
||||
] as const;
|
||||
|
||||
for (const key of requiredEnvs) {
|
||||
if (!process.env[key]) {
|
||||
// Keep as runtime warning for smoother local setup.
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`[env] Missing ${key}`);
|
||||
}
|
||||
}
|
||||
|
||||
export const env = {
|
||||
appUrl: process.env.NEXT_PUBLIC_APP_URL ?? "http://localhost:3000",
|
||||
jobSecret: process.env.JOB_SECRET ?? "",
|
||||
encryptionKey: process.env.ENCRYPTION_KEY ?? "",
|
||||
pleskCredEncKey: process.env.PLESK_CRED_ENC_KEY ?? "",
|
||||
stripeSecretKey: process.env.STRIPE_SECRET_KEY ?? "",
|
||||
stripeWebhookSecret: process.env.STRIPE_WEBHOOK_SECRET ?? "",
|
||||
stripePriceId: process.env.STRIPE_PRICE_ID ?? "",
|
||||
supabaseUrl: process.env.NEXT_PUBLIC_SUPABASE_URL ?? "",
|
||||
supabaseAnonKey: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY ?? "",
|
||||
supabaseServiceRoleKey: process.env.SUPABASE_SERVICE_ROLE_KEY ?? "",
|
||||
};
|
||||
Reference in New Issue
Block a user