mirror of
https://github.com/PeterMaquiran/tvone.git
synced 2026-04-23 04:25:51 +00:00
+2
-6
@@ -2,12 +2,8 @@ import { loadEnvConfig } from "@next/env";
|
|||||||
|
|
||||||
loadEnvConfig(process.cwd());
|
loadEnvConfig(process.cwd());
|
||||||
|
|
||||||
function getRequiredEnv(name: string): string {
|
function getRequiredEnv(name: string): string | null | undefined {
|
||||||
const value = process.env[name];
|
return process.env[name];
|
||||||
if (!value) {
|
|
||||||
throw new Error(`Missing required environment variable: ${name}`);
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOptionalEnv(name: string): string | undefined {
|
function getOptionalEnv(name: string): string | undefined {
|
||||||
|
|||||||
Reference in New Issue
Block a user