function getRequiredEnv(name: string): string {
  const value = process.env[name];
  if (!value) {
    throw new Error(`${name} environment variable must be set`);
  }

  return value;
}

export const JWT_SECRET = getRequiredEnv("JWT_SECRET");
export const MONGO_URL = getRequiredEnv("MONGO_URL");
