19 lines
432 B
TypeScript
19 lines
432 B
TypeScript
const warnEnv = ["EXPO_PUBLIC_API_URI"];
|
|
|
|
const errMsg = "does not exist in the environment.";
|
|
|
|
const missingEnv: string[] = [];
|
|
|
|
for (const key of warnEnv) {
|
|
if (!process.env[key]) {
|
|
missingEnv.push(key);
|
|
}
|
|
}
|
|
|
|
if (missingEnv.length > 0) {
|
|
throw new Error(`${missingEnv.join(", ")} ${errMsg}`);
|
|
}
|
|
|
|
export const API_URI = process.env.EXPO_PUBLIC_API_URI;
|
|
export const DEV_USER_ID = process.env.EXPO_PUBLIC_DEV_USER_ID ?? false;
|