import dotenv from 'dotenv'; | |
dotenv.config(); | |
const dbUri = process.env.DB_URI; | |
const HUGGING_TOKEN = process.env.HUGGING_TOKEN; | |
const GoogleAPIKey = process.env.GOOGLE_API_KEY; | |
const BotToken = process.env.BOT_TOKEN; | |
const IsTelegramBot = false; | |
if (IsTelegramBot) { | |
if(!BotToken) { | |
throw new Error("Required `BOT_TOKEN` "); | |
} | |
} | |
if (!dbUri && !HUGGING_TOKEN && !GoogleAPIKey) { | |
throw new Error("Missing variables required"); | |
} | |
export { | |
dbUri, | |
HUGGING_TOKEN, | |
GoogleAPIKey, | |
BotToken, | |
IsTelegramBot | |
}; |