import "dotenv/config";

const config = {
  port: process.env.PORT || 4000,
  nodeEnv: process.env.NODE_ENV || "development",
  api: {
    prefix: "/api",
  },
  cors: {
    origin: process.env.CORS_ORIGIN || "*",
    credentials: true,
  },
  database: {
    // For legacy file DB (unused once Mongo is configured)
    path: process.env.DB_PATH || "./data/db.json",
    // Mongo connection
    mongoUrl: process.env.MONGO_URL || process.env.MONGODB_URI || "",
    dbName: process.env.MONGODB_DB_NAME || process.env.MONGO_DB_NAME || "",
  },
};

export default config;

