// Settings environments
require("dotenv").config();

const config = {
  // Site Url
  baseURL: process.env.BASE_URL,
  port: process.env.PORT || 3000,
  // Veridy Token
  verifyToken: process.env.VERIFY_TOKEN,
  // If the Remember me option is not selected
  cookieExpirationTimeRememberTrue: parseInt(process.env.COOKIE_EXP_TIME_REMEMBER_TRUE), // 1 mounth
  // Remember me option is selected
  cookieExpirationTimeRememberFalse: parseInt(process.env.COOKIE_EXP_TIME_REMEMBER_FALSE), // 30 minute
  // Token Settings
  tookenExpirationTime: parseInt(process.env.TOOKEN_EXP_TIME), // 1 mounth
  secret: process.env.SECRET,
  // Crypt Salt Secret
  cryptoSalt: process.env.CRYPTO_SALT,
  // Avatar upload settings
  avatarNameLength: 15,
  avatarSizeLimit: 250000, // 250 KB
  avatarFileTypes: /jpeg|jpg|png/,
  // Mongo Settings
  //mongodburl: process.env.MONGODB_URI_PRO,
  mongodburl: process.env.MONGODB_URI,
  // mongodburl: 'mongodb://mongo:27017/jwt' //server
  // The Movie DB api key
  tmdbApiKey: process.env.TMDB_API_KEY,
  // Flixinfo api default language
  thmdbDefaultLanguage: "en-US",
  // Redis Cache değerleri
  redisCacheLength: parseInt(process.env.REDIS_CACHE_LENGTH) || 100, // server başladığında ilk chachelenecek kayıt miktarı
  redisTTL: parseInt(process.env.REDIS_TTL) || 86400, // veriler ne kadar süre cachede tutulacak
  //redisUrl: process.env.REDIS_URL_PRO,
  redisUrl: process.env.REDIS_URL,
};

module.exports = config;